Skip to main content
  1. Posts/

Ansible Wordpress Updates

·170 words·1 min· loading · loading ·
Table of Contents
thetorminal/ansible-wordpress-updates

Ansible playbook to update wordpress (major, themes and plugins)

null
0
0

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

Tested with:

  • Debian 12 Server
  • various Wordpress installations

Getting Started
#

Dependencies
#

Installing
#

Wordpress-Hosts:
#

  • Install WP-CLI: (Installation Guide from WP_CLI):
    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:
    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

Acknowledgments
#

torminal
Author
torminal
IT enthusiast

Related

Zabbix Template: Docker Image Updates
257 words·2 mins· loading · loading
Template to monitor the number of available Docker image updates on a host with Zabbix.
Telegram Servermanager
594 words·3 mins· loading · loading
This project gives you the possibility to run shell commands on a linux host from a telegram bot.
Zabbix Template: Drbd
101 words·1 min· loading · loading
Template to display a warning when the primary DRBD host becomes the secondary or the secondary goes offline.