Upgrading WordPress Via Command Line

by hugh on August 17, 2008

So WordPress 2.6.1 is out. I used to hate updating as i didn’t really know how to use any shell commands. Anyway now i do know and its rather easy. You have to have shell access to your server to be able to do this!

This is what i do, you can copy and paste these commands directly into PuTTY or whatever you are using.

First i change into the directory that the blog is in, mine is in a directory called blog.

1. wget http://wordpress.org/latest.tar.gz
2. tar xfz latest.tar.gz
3. rm -rf ./wp-admin
4. rm -rf ./wp-includes
5. cd wordpress/
6. cp -rpf –-reply=yes * ../
7. cd ..
8. rm -rf ./wordpress/
9. rm -f latest.tar.gz

That’s it! It takes about 1 minute! This is especially handy if your host doesnt have some kind of auto upgrade feature in the control panel. Please remember to backup your blog before doing any upgrades.

Bookmark and Share

No related posts.

Leave a Comment

CommentLuv Enabled

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.

Spam Protection by WP-SpamFree

Previous post:

Next post: