- You will need to check if updates exist on the server by SSH’ing into the server
-
- If updates exist you will need to get these changes down stream by firstly creating a new branch [server]
- Checkout to this new branch [server]
- Add the changes to the new branch [server]
- Commit these changes the new branch [server]
- Push this branch to the repo
- git push <REMOTENAME> <BRANCHNAME>
- Locally pull the changes from the repo
- Checkout to the new branch [server]
- Merge the new branch [server] into an up to date development branch [dev]
- Checkout to the development branch [dev]
- Ensure the local environment is set up and mimics the live site
- Check the database has been backed up, you will need a backup of the live site and the local database, keep these somewhere safe
- Create a copy of the live DB backup and inside of this copy update the urls to local url. (ensure you have saved this file)
- Ensure all the hidden files exist
- Ensure the local version of wp-config.php have the correct settings
- Download the uploads folder, this ensures we have the same content as the live site
- GIT – Make sure you have checked out to a development branch [dev], this branch should be up to date with master
- Update one plugin at a time
- Update the plugin
- Make sure the plugin is not causing any issues with the functionality it provides by testing the components it is integrated with.
- After updating the plugin stage and commit the changes from the update.
- Repeat …
- Update WordPress Core
- After updating all plugins and having made all the commits for those changes, you can update WordPress Core.
- Commit these Changes
- Update translations
- Update Translations and Commit
- Test All Important areas of the website locally, Posts, Custom Field Groups, Pages, Content, Payment Gateways, and other common elements.
- When testing is complete locally the updates need to be pushed to staging (remaining on the development branch [dev])
- If the staging environment does not exist this will need to be created.
- If you do not have permission to do this see your supervisor
- Copy your local DB, back it up and make changes to the URL’s contained in this file and save it as a new file(this will be used to create staging)
- Create a backup of the Live Database Before proceeding
- With the local database file that has been modified you will now need to upload this to a new database (usually [sitename]_staging)
- Pull the development branch into the staging subdomain.
- Upload the uploads.zip and unpack
- Update the wp-config.php file to point to the correct DB with the correct details
- Add .htpasswd to .htaccess
- Password is normally the username with !@# appended to the end for example
- user
- user!@#
- Test the website on the staging environment
- When the website has been tested internally
- Contact the client and provide them the details to view the updated website on the staging environment
- Follow up after 2-3 days and if the client is happy proceed with taking the updates live
- Once the updates are live to protect the client you can either
- Remove the subdomain so that they do not attempt to update the staging environment
- Change the .htaccess details so that they cannot log into the staging environment