WordPress Upgrade Today

My web host, DreamHost, offers a really great one-click install feature through its control panel. Using it, you can install the latest version of WordPress ridiculously easily. Even better, you can upgrade any WordPress install with a simple click… as long as that WordPress installation was installed using the one-click install system.

So here’s my problem. I have recognized the awesomeness of the one-click install/upgrade system, but if I want to take advantage of it, I have no choice but to export my entire blog — entries, comments, theme, plugins, modifications and all — and then re-import them all on a fresh one-click WordPress install. I’m doing this today. I think it will be worth it.

Anyway, if there’s any down time, you know why.

UPDATE 1: I have exported my WordPress database files, which is why I disabled commenting. (Sorry if you tried to leave a comment and lost it; deleting the wp-post-comments.php file was the quickest and easiest way to prevent new comments from being posted which wouldn’t make the transfer.) I’m running into other unforeseen problems, though, so commenting and new posts may be delayed for a few days.

UPDATE 2: OK, the weblog is running fine again, upgraded to WP 2.1. This is boring, but let me explain what happened for the possible benefit of someone else out there who is trying to do what I did and might run into some of the same problems.

Originally I wanted to just use the same database and just change the WordPress installation. This is no good if I want to use the DreamHost one-click install, though, because in order to upgrade your one-click install later, the WP installation has to be at the same location and using the same database that DreamHost originally installed it at. That means I had to export my blog and re-import. I used the WordPress Database Backup plugin that comes with WordPress 2.0 for that. Now I could have just deleted the WordPress directory, then reinstalled and reuploaded everything, but that would have involved a lot of down time, and besides, my installation was a little special.

You see, although my blog is in the directory /life/, that’s not the directory I installed WordPress in. I installed WordPress in another directory off the root. Let’s call it /abc/. To get this working, all I had to do was change a setting on the Options page and put a index.php file in the /life/ directory telling the browser where to find all the WordPress files.

So there’s a very simple solution to the upgrade problem. All I had to do was use DreamHost’s one-click install to put version 2.1 in a new WordPress directory (let’s call it /xyz/), then import all my old files, and upload my old theme and my old plugins to the new directory. Then I could run the upgrade script to upgrade my database to the new format, change the index.php in the /life/ to point to the new WordPress directory in /xyz/, and I’d be done, right? Simple.

Well, that was the theory, anyway. I ran into a minor snag.

There’s a field in the WordPress database telling WordPress what directory its files are installed in. When I imported the old database, it was still pointing to the old WordPress directory. So, for example, if I clicked on “upgrade database” at /xyz/upgrade.php, it would take me to a page in the /abc/ directory. When I tried to log in at /xyz/wp-login.php, it kept taking me to a page in /abc/ and telling me I had the wrong password. In short, with the wrong WordPress directory in the database, the WordPress installation was unusable. Furthermore, if you’re not paying close attention to the URLs you’re going to and your WP directories are very similar, you might not even realize what’s going on right away. I was confused for a good 5 minutes myself.

Anyway, the .SQL database file is a text file, and it’s not too hard to open it up with a good text editor (not Word!) and edit the offending field. After uploading that, it would work fine. This is where I hit another snag.

Every time I tried to upload the new, edited file in phpmyadmin, I got, “error, no input specified.” I should mention that right around this time, my internet connection also totally crapped out on me. Since it was a rather large file (over 4 MB) I couldn’t be sure if I was getting the error because the connection was bad and the file was too big, or because I had changed the file and something about the format I saved it in was not right.

In the end, I imported the original (unedited) database file, then cut out and edited only the small section which contained the WP directory part. That overwrote the other imported WP directory. (I’m not sure if this worked because of the way I did it or because the internet suddenly started behaving again.) After that, everything proceeded according to plan.


John Pasden

John is a Shanghai-based linguist and entrepreneur, founder of AllSet Learning.


  1. Having moved to dreamhost on your (and several other people’s) advice, I’m blissfully happy with it.

    one click upgrade warning! you really need to upgade your version of WP to the same as the one click install BEFORE transferring your database.

  2. John,

    Don’t forget to backup your entire wordpress directory via ftp first!

    Have a great day!

  3. Test. Yay!

  4. Adam P,

    Why do you say that? WP has a database upgrade script built in. That wasn’t an issue for me at all.

  5. I moved over my 2.07 database to the new one click 2.1 db and I kept losing my comments. When I upgraded to 2.1 first, everything went smoothly.

  6. Not sure if you caught the iDrone post I did the other day, but if so, you’ll know I did the WP2.1 upgrade thing too. As nice as the “one click” idea sounds – I’ve never met an idiot-proofing … I mean “simplification” system I like.

    WYSIWYG is a pain in the ass in nearly every form its taken over the years (especially in web design and blog publishing software), Windows is getting harder and harder to debug for all the “increased ease” that is added to it. Bah… I’m not saying I want DOS back, but I’ll stick to the DIY two- or three-click standard WP2.1 install over the cross-your-fingers/no-turning-back automated approach.

  7. I setup a Dreamhost plan following your recommendation for hosting from China and use a WordPress blog called http://www.catshanghai.com/blog. I had the same dilemna as you, so I went into PhpMyAdmin and exported the database as a backup. Then, I went through the one click install. Dreamhost backup your old file structure into a folder called blog.old so you can restore it if the install goes wrong. You have to point the new WordPress to use the same MySQL database as your old wordpress site. Make sure you backup your plugins and themes.

    When I carried out the one click install, all my data and themes were still intact, but I had to go into wp-admin to complete the upgrade. There was no need to restore the backup. Nothing was lost. The upgrade worked fine.

Leave a Reply