Serverwide updating of Wordpress/Plugins/Themes with wp-cli

BBM

Verified User
Joined
Jun 8, 2013
Messages
416
Location
Dutch Mountains
I have a number of Wordpress installations running on my CentOS VPS, and I'm mostly the only one that maintains them.

Now since versions 5.5, Wordpress is able to auto-update themes and plugins, but only 'if' its told to.
Also major releases of Wordpress still need to be updated manually, and I like to auto-update all the Wordpress-installations on my server at once.

I've looked into wp-cli, but this still seems like a manual operation which has to be done for each and every user.
Anyone have tips to automate this with a script or something?
 
We use Softaculous in which you can update Wordpress installations and even force them server wide. However, This does not auto update themes and plugins. Softaculous is not free but they have good support.
 
From what I gathered with wp-cli, you would have to change the user (in the command) for every domain that has a WP-installation by using a sudo-command and executing the wp-cli from that user.
Shouldn't be that hard to put in a script "I would think".

How hard can it be...? :D
 
I know this is from last month, but I thought I would add a potential solution.

Unless an admin specifically had to have wp-cli perform this process, one swoop through all of the wp-config.php files, and it could be set and forgotten.


Code:
define( 'WP_AUTO_UPDATE_CORE', true );

Value of true – Development, minor, and major updates are all enabled
Value of false – Development, minor, and major updates are all disabled
Value of 'minor' – Minor updates are enabled, development and major updates are disabled
 
  • Like
Reactions: BBM
Or you can use ManageWP software and update every WP instance with one click. :)
 
Back
Top