Wordpress Hack – How to Upgrade Wordpress in 15 seconds using SSH/Wget!

by admin on Wednesday, February 17th, 2010

I’ve been upgrading Wordpress for almost 4 years now and since I manage about 20 blogs, I have learned to figure out how to upgrade your Wordpress faster than ever using SSH and wget command.

For one, you will need a dedicated server/VPS that supports SSH.  Otherwise you won’t be able to do it.

Here’s exactly how I do it.

1) I go to my Wordpress directory using the command cd. ~ 2 seconds

2) I use wget to pull the latest wordpress files, “wget http://wordpress.org/latest.tar.gz” ~ 3 seconds

3) Then I unzip the tar file using “tar xvf latest.tar.gz” ~ 5 seconds (see tar command howto here)

4) Then I remove the wp-admin and wp-includes directories by doing “rm wp-admin -rf” and “rm wp-includes -rf“. ~ 3 seconds

5) Next I will copy over the old Wordpress files with the new ones using commands, “cp wordress/* . -rf –reply=yes” ~ 2 seconds.

6) I am done, that’s 2+3+5+3+2=15 seconds.  If you are on at least a quad-core CPU server, downloading and unzipping should be rather fast but for those of you on slower servers, give it couple more seconds as download/unzip will take longer.

This is lightening fast compared to downloading Wordpress files to your computer, unzipping it then uploading them to your website via FTP.  And if you are on shared hosting, sometimes uploading FTP can take forever.

Even if you use built-in upgrade functions in Wordpress, you are not going to beat SSH, not even a chance.

Of course, even better than this is to write a simple bash shell script that will do all the above for you.  Then you could probably do it in just about 5 seconds.  I will try to write a script soon and let you know on that btw.  (I just realize it!)

Rate

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Related News and Resources



Leave a Reply