An open API service indexing awesome lists of open source software.

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)

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:
![ansible-wordpress](https://github.com/user-attachments/assets/2f2f2d46-fd46-47e4-a773-9bf879516f38)

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)