Core update
Check here to get the most current stable version https://make.wordpress.org/core/
https://github.com/aad-wsux/cornell-alumni/blob/master/docs/updating-wordpress.md
1. Make sure master branch is current
git checkout master
git pull
2. Make a new branch for the update
This will be done in the cornell-alumni and cornell-giving git repos. Make a new branch to commit the changes to.
git checkout -b update20210215
3. Update the WP version in the composer.json file
This is in 4 locations. The first 3 are in the repositories
section.
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "package",
"package": {
"name": "pantheon-systems/wordpress",
"type": "wordpress-core",
* "version": "5.2.2",
"dist": {
* "url": "https://github.com/pantheon-systems/WordPress/archive/5.2.2.zip",
"type": "zip"
},
"source": {
"url": "git@github.com:pantheon-systems/WordPress.git",
"type": "git",
* "reference": "5.2.2"
}
}
}
],
The last is in the require
section.
"require": {
"php": ">=7.1",
"composer/installers": "~1.2.0",
"koodimonni/composer-dropin-installer": "~1.1.0",
"vlucas/phpdotenv": "^2.0.1",
"johnpbloch/wordpress-core-installer": "~0.1",
* "pantheon-systems/wordpress": "5.2.2",
4. Run composer update
Composer update is required to build the correct composer.lock file, which is used to build and deploy the changes.
5. Commit the changes
Commit the composer.json and composer.lock file changes to git and publish to both the remote repos.
6. Verify in multidev
Since this is handled in git, it should be possible to verify the change in multidev. This will allow testing the update before publishing to master.
7. Merge and Deploy
Follow pantheon processes to move the files to production.
Updating Plugins
https://github.com/aad-wsux/cornell-alumni/blob/master/docs/updating-plugins.md
Updating the plugins
Start a new branch in the local git repo.
In the composer.json file, find each of the plugins and update the version to the new version.
From the site root, run the command composer update
. This will rebuild the composer.lock file, which is necessary to update the plugins.
Commit the changes, publish the branch, and start a PR. Be sure to include the update chart from the wp plugin update
command.
Two notable exceptions are WPForms and Events Calendar Pro, which are premium plugins. The process for these plugins will be addressed at the end of this document.
Premium plugins
This process will allow updating of most plugins. For the premium plugins, it will require some additional steps.
- Log into the premium plugin site to check if there is an update available.
- Download the update as a zip file.
- Replace the file located in the
premium_plugins
folder.
As usual, commit the changes and note the update in git, asana, and teamhub.