WPCLI – update plugins, themes, and core, all in one row, instead 3 rows?

Run a script instead:

0 0 * * * for dir in /var/www/html/*/; do cd "$dir" && ./updatewp.sh; done

In updatewp.sh:

wp core update --all --allow-root
wp plugin update --all --allow-root
wp theme update --all --allow-root

Leave a Comment