|
|
2e03d1 |
# Wordpress SOPs
|
|
|
237f04 |
|
|
|
237f04 |
## Updating wordpress to next release
|
|
|
237f04 |
|
|
|
237f04 |
As wordpress is deployed by Ansible, we also have an 'ad-hoc' ansible task to rollout upgrades.
|
|
|
237f04 |
To do this, it's using the `wp_release` ansible variable, that corresponds to the [wordpress version](https://wordpress.org/download/releases/) to download and unarchive.
|
|
|
237f04 |
|
|
|
237f04 |
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.
|
|
|
237f04 |
|
|
|
237f04 |
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.
|
|
|
237f04 |
|
|
|
237f04 |
PS: you need `administrator` right to then be able to visit the /wp-admin/update-core.php
|
|
|
237f04 |
|
|
|
237f04 |
So edit the ansible inventory/host_vars section with new value and then launch the ad-hoc task:
|
|
|
237f04 |
|
|
|
237f04 |
```
|
|
|
237f04 |
ansible-playbook-dev playbooks/adhoc-upgrade-wordpress.yml
|
|
|
237f04 |
|
|
|
237f04 |
PLAY [hostgroup-role-wp] **********************************************************************
|
|
|
237f04 |
|
|
|
237f04 |
TASK [Gathering Facts] ************************************************************************
|
|
|
237f04 |
Wednesday 11 August 2021 15:54:47 +0200 (0:00:00.134) 0:00:00.134 ******
|
|
|
237f04 |
ok: [artwork-2.dev.centos.org]
|
|
|
237f04 |
|
|
|
237f04 |
TASK [Upgrading wordpress to version 5.8] *****************************************************
|
|
|
237f04 |
Wednesday 11 August 2021 15:54:52 +0200 (0:00:04.926) 0:00:05.061 ******
|
|
|
237f04 |
changed: [artwork-2.dev.centos.org]
|
|
|
237f04 |
|
|
|
237f04 |
TASK [Upgrading wordpress plugins if needed] **************************************************
|
|
|
237f04 |
Wednesday 11 August 2021 15:54:57 +0200 (0:00:05.298) 0:00:10.359 ******
|
|
|
237f04 |
ok: [artwork-2.dev.centos.org] => (item={'name': 'openid', 'version': '3.5.0'})
|
|
|
237f04 |
changed: [artwork-2.dev.centos.org] => (item={'name': 'classic-editor', 'version': '1.6.2'})
|
|
|
237f04 |
changed: [artwork-2.dev.centos.org] => (item={'name': 'remove-xmlrpc-pingback-ping', 'version': 1.4})
|
|
|
237f04 |
changed: [artwork-2.dev.centos.org] => (item={'name': 'google-analytics-dashboard-for-wp', 'version': '6.8.0'})
|
|
|
237f04 |
changed: [artwork-2.dev.centos.org] => (item={'name': 'akismet', 'version': '4.1.10'})
|
|
|
237f04 |
|
|
|
237f04 |
PLAY RECAP ************************************************************************************
|
|
|
237f04 |
artwork-2.dev.centos.org : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
|
|
237f04 |
|
|
|
237f04 |
```
|
|
|
237f04 |
|
|
|
237f04 |
Once it's done, just ensure to visit <url>/wp-admin/update-core.php and then verify the results.
|
|
|
237f04 |
If it's all working fine, you can then proceed with the `prod` instance.
|