No announcement yet.

How to upgrade wordpress from Unix Shell?


Unconfigured Ad Widget

  • Filter
  • Time
  • Show
Clear All
new posts

  • kilter
    Re: How to upgrade wordpress from Unix Shell?

    Thanks to this post I was able to upgrade WP on my sites in no time. I dreaded having to wait for the slow ftp process to complete with my sites being down.

    After testing the process on one site and seeing how fast it was, I did not even bother activating the maintenance mode plug in on the other sites. My users tend to get pissed off when the site goes down for a few mins and following the steps you provided prevents this.

    One thing I did before copying over the new WP files to the site, was delete the wp-contents folder from the new WP files. I did not want it over writing what I had in my existing WP-contents folder (plug-ins and themes)

    Thanks again.

    Leave a comment:

  • ryan
    started a topic How to upgrade wordpress from Unix Shell?

    How to upgrade wordpress from Unix Shell?

    How to upgrade wordpress from Unix Shell?

    1) Backup existing database and wordpress directory

    Lets take an example of 28Nov2006.

    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

    2) Download latest wordpress CMS

    $ cd /tmp
    $ wget
    $ unzip

    3) Overwrite all new files
    $ cd /var/www/html/blog
    $ cp -avr /tmp/wordpress/* .
    $ rm -rf /tmp/wordpress /tmp/
    Open a browser and run update script such as

    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
    Last edited by ryan; 03-11-2009, 10:29 AM.

Sign up for a News Letter Click here to sign up