Upgrade на WordPress от shell.

Вместо да обяснявам ред по ред предоставям простo  sh скриптче което прави всичко:

#!/bin/sh
mysqldb="vashata_baza";
mysqluser="vashiqt_user";
mysqlpass="vashata_parola";
wp_dir="/var/yourblog.com/public_html/";
cd /tmp/
echo "Backup your WordPress DB: $mysqldb";
mysqldump -u$mysqluser -p$mysqlpass $mysqldb > /tmp/wordpress_blog.sql
echo "Backup your Old WordPress";
#cp -Rp $wp_dir /tmp/wordpress_blog_backup/
echo "Download new WordPress";
wget -q http://wordpress.org/latest.zip
unzip /tmp/latest.zip
echo "Replace old WordPress files";
cp -avr /tmp/wordpress/* $wp_dir
echo "Delete temp files";
rm -fr /tmp/latest.zip /tmp/wordpress/
echo "Visit http://yourblog.com/wp-admin/upgrade.php"
echo "Click: Upgrade WordPress Database";
echo "Your WordPress is updated successfully"

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Upgrade на WordPress от shell., 5.0 out of 5 based on 1 rating

Вашият коментар

Вашият email адрес няма да бъде публикуван Задължителните полета са отбелязани с *