What I Learned Upgrading to WordPress 2.9

by Don Campbell on December 22, 2009 · 76 comments

WordPress 2.9 was released a couple of days ago. I read about all the cool new features and said to myself – “hey, I need that version!” so I used my favorite WordPress Automatic Upgrade plug-in to upgrade my primary blog to WP 2.9.

I got almost all the way to the end of the upgrade process, where it told me a “CLICK HERE TO COMPLETE THE FINAL STEP.” When I clicked OK I was rewarded with this nice little message: “ERROR: WordPress 2.9 requires MySQL 4.1.2 or higher”

Apparently, my blog was running a version earlier than that. So now all my files are upgraded to WP 2.9, but my database is not compatible. Now what!?

Damage Control

My blog is officially offline.

I use BlueHost and 1and1 for my WordPress hosting. I primarily use BlueHost now because they’ve got the whole WordPress install and upgrade process dialed in, but this blog was hosted on 1and1. I looked at their help to see how to upgrade my database, and a quick check told me that I had to do a lot of stuff to make that happen.

Luckily, I did perform the backups that are recommended as part of the upgrade process with the plug-in. So I took my backup files and copied them over my the WP 2.9 files that had just been copied into my blog directory. My blog was now restored to a state where it was displaying posts, but the editing controls in the WordPress Admin panel were not working.

Upgrading MySQL Database

So I was faced with the task of upgrading MySQL to 4.1.2 or higher. The instructions from 1and1 were:

1) Export your existing database using phpMyAdmin
2) Create a new MySQL 5 database
3) Import your database file into your new database using phpMyAdmin
4) Update your wp-config.php with the new database info

Ok, I think I can handle this.

So I went into the 1and1 control panel and created a new MySQL 5 database. Then I exported my existing database:

Then I imported it into my new MySQL 5 Database:

This seems easy enough. But wait:

Access Denied.

DAMMIT!

Ok. Keep calm. What the __ do I do next?

Well, after trying it a few more times and realizing I wan’t getting anywhere, I called 1and1 support. The support guy had to keep putting me on hold, but eventually he told me that I needed to delete a couple of lines at the beginning of the MySQL back up file.

These lines specified the old database name, which was causing the permissions error.

Ok, now that’s cool, but my SQL backup file is 4.6mb, and I see that the max file size on the import screen is:

(Max: 2,048KB)

Nice.

What I ended up doing is opening the SQL backup file in a text editor, copying the entire text from the file, and pasting it into the box on the import screen.

I was rewarded with a box that said my import was successful.

Finally… Upgrade Success

I then went and put WordPress into maintenance mode, updated the wp-config.php file with my new database settings, took it out of maintenance mode and verified everything was working fine.

Tip: You can put WordPress into maintenance mode by creating a file in your WordPress directory called .maintenance with the following code in it: <?php $upgrading = time(); ?> to take it out of maintenance mode, just rename or delete the file.

Now when I went through the WordPress Automatic Upgrade process, the WordPress 2.9 upgrade went smoothly.

Man, that was a hassle! I wish WP Automatic Upgrade would have told me up front that my database wasn’t compatible with WordPress 2.9. It would have saved me a lot of last minute panic.

Anyway, I wanted to share this in case anyone else has a similar problem and does a panicked Google search looking for a solution!

{ 12 trackbacks }

ABG » WordPress Update
December 22, 2009 at 9:14 am
A Ghost of Daisies » Blog Archive » Upgrade 1and1 MySQL for WordPress 2.9
December 22, 2009 at 5:55 pm
WordPress 2.9 Upgrade on 1and1 Hosting Provider : IMBM – Internet Marketing By Me
December 27, 2009 at 5:24 am
What Typewriter Do You Use – Part 19
December 29, 2009 at 6:43 pm
Failure is the Key to Success » Blog Archive » Upgrading to Wordpress 2.9
December 31, 2009 at 9:31 am
How to Update Wordpress Version 2.9 Without Pain | infinite42
December 31, 2009 at 11:41 am
A Concurrent Affair » Blog Archive » Auto-Upgrade to WordPress 2.9
January 2, 2010 at 10:50 pm
Tales of a Concert Junkie From Poulsbo » I’m back…who knows?
January 4, 2010 at 11:46 pm
Wordpress, 1and1, and MySQL | Spence Green
January 9, 2010 at 11:49 pm
Switching MySQL Databases on 1and1
January 14, 2010 at 12:52 pm
Key Our Cars » Blog Archive » Site Code Upgrade
February 19, 2010 at 7:11 am
WordPress Upgrade on 1and1 « PhilipWang.net
February 28, 2010 at 12:53 pm

{ 64 comments… read them below or add one }

1 Adrian February 14, 2010 at 5:03 am

Thanks for sharing this. I just had to do this for a friend’s site I’m helping out with and would’ve been completely lost if it weren’t for your guide:)

Reply

2 digitallife February 18, 2010 at 5:02 pm

I am having a world of trouble trying to export my wordpress db from 1and1.com are those the settings you used (the ones in the image or did you also select add drop tables and unchecked the Use hexadecimal for binary fields?

Reply

3 johngreg February 22, 2010 at 1:08 pm

To: digitallife
the export should work with all settings as shown;
have you set up the .htaccess file to run your 1and1 site in PHP5?

Reply

4 dfb February 27, 2010 at 11:36 pm

Thanks. This also helped me migrate. The 1and1 documentation for upgrading databases is too limited and not all that helpful. I ended up cutting and pasting into the query field as well.

Reply

Leave a Comment