How to upgrade WordPress via shell?


Step 1#

First make backup of the wordpress database and the wordpress blog installation directory :

mysqldump username_DBname > username_DBname.sql

tar -cvf public_html.tar public_html
tar -cvf directoryname.tar directoryname

Step 2#

cd /directoryname (where wordpress installed)

Download latest wordpress CMS

follow all the steps as given below :

tar xfz latest.tar.gz
rm -rf ./wp-includes/
rm -rf ./wp-admin/
cd wordpress/
scp -rp * ../
cd ..
rm -rf ./wordpress/
rm -f latest.tar.gz

Step # 3: Change ownership to user now :

cd ..
chown user:user * -R

Step # 4: Run update Script :

Open a browser and run update script such as


That’s it !

PrewebHost Hosting Solutions.
Cheap & Affordable Hosting Service Provider Since 2010