Last active
April 29, 2016 11:07
-
-
Save xezpeleta/c2398ff374e2e4372a69 to your computer and use it in GitHub Desktop.
Keep your WordPress installations updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| ## | |
| # update-wordpress.sh It will update your WordPress installation using the utility wp-cli http://wp-cli.org | |
| # To keep your WP updated, you can copy this script into your /etc/cron.daily directory | |
| # Don't forget to add execution right and remove ".sh" extension from the filename. | |
| ## | |
| WPDIR=/var/www/myblog | |
| sudo -u www-data -s -- <<EOF | |
| echo "Updating myblog.mydomain.eus WordPress..." | |
| wp --path=$WPDIR core update | |
| wp --path=$WPDIR plugin update --all | |
| wp --path=$WPDIR theme update --all | |
| wp --path=$WPDIR core language update | |
| EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment