This file contains 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/bash | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/vesta/bin | |
SHELL=/bin/bash | |
MULTILINE=$(ls \ | |
-1) | |
#Get latest WP-CLI | |
rm -rf /home/wp | |
wget --quiet https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O /home/wp | |
chmod +x /home/wp | |
sleep 2 | |
PHP_PATH="/usr/bin/php" | |
# Start updating | |
echo -e "Updating WP core $Color_Off"; | |
sudo -H -ubmagazine /usr/bin/php /home/wp core update --skip-plugins --skip-themes --path='/home/bmagazine/web/bitcoinmagazine.nl/public_html' | |
echo -e "Updating plugins $Color_Off"; | |
sudo -H -ubmagazine /usr/bin/php /home/wp plugin update-all --skip-plugins --skip-themes --path='/home/bmagazine/web/bitcoinmagazine.nl/public_html' | |
echo Clearing REDIS Cache: $(/usr/bin/redis-cli flushall) | |
sudo -H -ubmagazine /usr/bin/php /home/wp total-cache pgcache_cleanup --skip-themes --path='/home/bmagazine/web/bitcoinmagazine.nl/public_html' | |
service nginx restart | |
service php-fpm restart | |
/usr/sbin/sendmail "wessel@responsivemedia.nl" <<EOF | |
subject:Daily WP Updates | |
from:root@server.bitcoinmagazine.nl | |
$(cat /home/log.txt) | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment