2008
07.31

Upgrade wordpress from Shell

Type the following commands at shell prompt:

$ mkdir /backup/wp/28nov2006
$ mysqldump -u user -p WP-DATABASENAME > /backup/wp/28nov2006/blog.db.sql
$ tar -zcvf /backup/wp/28nov2006.tar.gz /var/www/html/blog
Step # 2: Download latest wordpress CMS

$ cd /tmp
$ wget http://wordpress.org/latest.zip
$ unzip latest.zip
Step # 3: Overwrite all new files

$ cd /var/www/html/blog
$ cp -avr /tmp/wordpress/ .
$ rm -rf /tmp/wordpress /tmp/latest.zip

Open a browser and run update script such as http://yourblog.com/wp-admin/upgrade.php

And you are done. Thanks to UNIX shell access. It just took less than 1 minute Replace path names and database name with actual values.

In case, if something goes wrong, you can always restore old database and files from /backup/wp/28nov2006 directory.

Thanks to these guys for the write up

No Comment.

Add Your Comment