Wordpress SOPs
Wordpress SOPs¶
Updating wordpress to next release¶
As wordpress is deployed by Ansible, we also have an 'ad-hoc' ansible task to rollout upgrades.
To do this, it's using the wp_release
ansible variable, that corresponds to the wordpress version to download and unarchive.
If you need to update the deployed plugins, update also in ansible inventory the wp_plugins
list to reflect new versions of the plugins to be updated.
We want to first validate a successful upgrade on the dev
instance, available on https://blog.dev.centos.org and then proceed with the prod
one later.
PS: you need administrator
right to then be able to visit the /wp-admin/update-core.php
So edit the ansible inventory/host_vars section with new value and then launch the ad-hoc task:
ansible-playbook-dev playbooks/adhoc-upgrade-wordpress.yml
PLAY [hostgroup-role-wp] **********************************************************************
TASK [Gathering Facts] ************************************************************************
Wednesday 11 August 2021 15:54:47 +0200 (0:00:00.134) 0:00:00.134 ******
ok: [artwork-2.dev.centos.org]
TASK [Upgrading wordpress to version 5.8] *****************************************************
Wednesday 11 August 2021 15:54:52 +0200 (0:00:04.926) 0:00:05.061 ******
changed: [artwork-2.dev.centos.org]
TASK [Upgrading wordpress plugins if needed] **************************************************
Wednesday 11 August 2021 15:54:57 +0200 (0:00:05.298) 0:00:10.359 ******
ok: [artwork-2.dev.centos.org] => (item={'name': 'openid', 'version': '3.5.0'})
changed: [artwork-2.dev.centos.org] => (item={'name': 'classic-editor', 'version': '1.6.2'})
changed: [artwork-2.dev.centos.org] => (item={'name': 'remove-xmlrpc-pingback-ping', 'version': 1.4})
changed: [artwork-2.dev.centos.org] => (item={'name': 'google-analytics-dashboard-for-wp', 'version': '6.8.0'})
changed: [artwork-2.dev.centos.org] => (item={'name': 'akismet', 'version': '4.1.10'})
PLAY RECAP ************************************************************************************
artwork-2.dev.centos.org : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Once it's done, just ensure to visit prod
instance.