Upgrading Wordpress Using SSH
If you have SSH access to your hosting account upgrading Wordpress can be done very quickly and easily.
All you need is:
- SSH (obviously)
- MC - midnight commander
mkdir wpupgrade
Move into that directory:
cd wpupgrade;wget http://wordpress.org/latest.tar.gz
The second part of the command will download a copy of the most recent release of Wordpress.
You will then need to extract it using tar:
tar -zxvf latest.tar.gz
This will create a new directory called wordpress with the latest version.
You now need to ensure that you have backed up the important parts of your current install:
cd ../web
Move into your web directory. If your blog is installed below the root, then you will need to move into that directory.
You will then take a backup of some of the essential files:
mkdir backup
cp wp-config.php .htaccess backup
cp -R wp-content backup
rm wp*.php .htaccess license.txt readme.html xmlrpc.php
rm -rf wp-admin wp-includes
cp backup/wp-config.php .
These commands backup the essential bits, remove the old files and back up the config. You also have a backup of the wp-content directory just in case.
You can then use midnight commander to copy the new files and directories over.
Simple type the command "mc" and then navigate so that the left pane has your new wordpress files and the right pane is the directory you are installing it all into.
Once you've copied over the files you can then visit your wp-admin directory, where you should be prompted to upgrade your Wordpress database.
Depending on your configuration you may need to tweak some of the permissions and deactivate / reactivate plugins to get everything working as before.
Enjoy!
PS: It works for me, but it might cause your blog to explode! You have been warned! :)
Categories
tips0 TrackBacks
Listed below are links to blogs that reference this entry: Upgrading Wordpress Using SSH.
TrackBack URL for this entry: http://www.blogcookbook.com/cgi-bin/mt/mt-tb.cgi/566

Leave a comment