This blog post falls outside the normal realm of this website. I’m going to write some notes on upgrading to WordPress 3.0 with web hosting through 1&1. My regular readers (if such people exist) will want to skip over this post. I was struggling with this technical issue for way too long, and I’m so happy that everything’s working correctly that I’ve decided to write this post in the hopes that someone else having these issues might find help here.
1. I do my web hosting through 1&1. I know, it’s not the greatest company to work with, but their hosting is dirt cheap. I’ve often referred to 1&1 as the Wal-Mart of web hosting (except you can actually get decent help at a Wal-Mart).
2. I saw that WordPress 3.0 was out, and I decided to upgrade.
3. Before I made the jump, in case anything went wrong, I decided to back everything up.
- I use the WordPress Database Backup plugin, which I have set to email me backups of my database on a daily basis, so my database was already backed up. If you don’t use this plugin or are otherwise looking for help on how to back up your database, read this guide on the WordPress website.
- Backing up your database doesn’t back up the files on your server. To do that, I simply fire up my FTP program (I’m on a Mac, and I use Cyberduck) and download all of the files from my server onto my computer.
4. Now that everything had been backed up, I tried the automatic upgrade to 3.0 from within WordPress. It would stay on the “downloading” stage indefinitely. It wasn’t working.
5. I thought that some plugins might be getting in the way, so I deactivated them all. (You’re actually advised to do this every time you upgrade, but I usually don’t.)
6. I tried the automatic upgrade again, and it still wouldn’t get past the “downloading” stage.
7. I decided to manually upgrade.
- I downloaded 3.0 from the WordPress website.
- I overwrote all of the old WordPress files on my server with the new ones EXCEPT wp-config.php and the wp-content folder. (The wp-content folder houses all of your plugins and themes, so overwriting it entirely would cause you to lose these things; instead, overwrite the contents of the folder.)
- I copied my individualized data (such as database name and password, etc.) from the old wp-config.php file into the corresponding areas of the wp-config-sample.php file in the WordPress 3.0 folder I downloaded. When I’d copied everything over (and added more of those “Authentication Unique Keys and Salts” using the generator at https://api.wordpress.org/secret-key/1.1/salt/), I saved the wp-config-sample.php file as wp-config.php and overwrote the old wp-config.php file on my server with this new one.
- I then went to www.mydomainname.com/wp-admin/upgrade.php to access the WordPress upgrade page, and this is when the trouble started.
8. The upgrade page told me that I wasn’t running a recent enough version of MySQL. That’s not good to hear. As someone on a shared web hosting plan, I don’t have much control over which versions I run of these types of things. I logged in to my 1&1 Control Panel and found that the current database running my WordPress site was an older version of MySQL4. I found that I could also create new MySQL5 databases. Believe it or not, I found help on migrating WordPress databases from MySQL4 to MySQL5 here on the 1&1 Blog.
9. Following the instructions on that blog post, I created a new MySQL5 database. 1&1 says that it can take up to 3 hours for the new database to be ready, but mine only took a few minutes. REMEMBER TO WRITE DOWN THIS PASSWORD YOU CREATE. You’ll need it later.
10. The next step in the 1&1 Blog post said to export data from the old MySQL4 database. They weren’t very specific about which boxes to check when exporting, though, so I followed the directions back on that database back up guide on the WordPress website I referenced above.
11. The 1&1 Blog post makes it sound like your exported database will be saved as a .txt file, but mine was simply “exported” to me in a text box in PHPMyAdmin. The 1&1 Blog also tells you to “delete the two lines that start with ‘CREATE’ and ‘USE’ as they will interfere with our import operation,” but the text that I was presented with didn’t even include those lines.
12. Continuing to follow the instructions on the 1&1 Blog post, I opened PHPMyAdmin for the new MySQL5 database, went to the “SQL” tab, pasted the “exported” text I had copied into the box, and hit the “Go” button.
13. The 1&1 Blog then gives directions to put your WordPress site into maintenance mode. I tried doing as they said, but it didn’t work, and I didn’t really care about telling my visitors why the site was under construction, so I just kept going (and later deleted the .maintenance file they tell you to create).
14. Like the 1&1 Blog says to do, I updated the wp-config.php file on my server with my new MySQL5 database username, password, and hostname. (This is when you’re glad you wrote down that password.)
15. Again, I tried going to www.mydomainname.com/wp-admin/upgrade.php. This time, it worked! Everything seemed to be just right.
16. I reactivated the plugins I had deactivated. Then things turned downhill again. I got a server Error 500 message. That’s never fun. I found that by refreshing pages and only activating certain plugins, I could narrowly avoid the Error 500 message. I kept trying to dodge the error message as I navigated through the back-end of WordPress, but it finally go to the point that it wouldn’t even let me access the back-end (www.mydomainname.com/wp-admin). This was really bad.
17. A Google search then lead me to a thread on the WordPress support forums where someone else was also getting Error 500 messages on 1&1. In the thread, someone suggested that the problem was caused by the .htaccess file not specifying PHP5. The solution was irritatingly simple. All I had to do was add the following lines to the .htaccess file on my server:
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
18. I reactivated all of my plugins.
That’s it. Everything seems to be working correctly again. I don’t know much at all about server issues like this or PHP, so I don’t understand why this works; I simply know that it does.
I was about to start tearing hair out while looking for solutions to this, and I’m very thankful for the guides and blog posts and forum threads that walked me through it. Hopefully this blog post can save a few hairs somewhere.
[7/9/2070 UPDATE: Well, like I said, everything seemed to be working correctly. Then I started noticing that some quotation marks/apostrophes, ellipses, hyphens, and other non-alphanumeric characters were appearing as strange code/characters. Not all of them were messed up, though. It seems that these affected characters tended to come from pieces of text that were pasted into a WordPress post from somewhere else, though that wasn't always the case. I've read something online suggesting that this is caused by composing such characters using the "Visual" tab rather than the "HTML" tab. Does this mean one should always write under the "HTML" tab? Any advice would be greatly appreciated. I'll continue to look into this.]