https://github.com/thetorminal/ansible-wordpress-updates
Ansible playbook to update wordpress (major, themes and plugins)
https://github.com/thetorminal/ansible-wordpress-updates
ansible ansible-playbook wordpress wordpress-updater
Last synced: about 2 months ago
JSON representation
Ansible playbook to update wordpress (major, themes and plugins)
- Host: GitHub
- URL: https://github.com/thetorminal/ansible-wordpress-updates
- Owner: thetorminal
- Created: 2025-02-28T00:00:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-28T14:56:58.000Z (over 1 year ago)
- Last Synced: 2025-04-14T06:31:32.782Z (about 1 year ago)
- Topics: ansible, ansible-playbook, wordpress, wordpress-updater
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ansible-wordpress-updates
Ansible playbook to update wordpress (major, themes and plugins).
## Description
This playbook allows you to update multiple wordpress installations - it automatically scans for all wordpress installations at /var/www.
Befor the update, it will write a backup of the Database to `/var/www/update-backups`.
For each step (major, plugin and theme updates) it will print the available updates and ask you, if you really want to run the update.
WP-CLI is used to run the updates.
Example:

Tested with:
* Debian 12 Server
* various Wordpress installations
## Getting Started
### Dependencies
* Linux server with a wordpress installation
* [Github - WP-CLI](https://github.com/wp-cli/wp-cli) installed on the host ([Installation Guide](https://github.com/wp-cli/wp-cli?tab=readme-ov-file#installing))
* Ansible
### Installing
#### Wordpress-Hosts:
* Install WP-CLI:
([Installation Guide from WP_CLI](https://github.com/wp-cli/wp-cli?tab=readme-ov-file#installing)):
```sh
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
```
Test, if it was successfull:
```sh
wp --info
```
#### Ansible server:
* add the role `wordpress-updates.yml` to your ansible-directory.
* add the server(s) with the wordpress installation(s) in a ansible host-group named [webserver]
* run the playbook
## Version History
* 1.0
* Initial Release
## Acknowledgments
* [Github - WP-CLI](https://github.com/wp-cli/wp-cli)