Posts Tagged ‘1and1’

Tips for upgrading to WordPress 2.9 on 1and1

Thursday, December 24th, 2009

A few days ago I upgraded this blog from WordPress 2.8.5 to 2.9. Here are some tips on what I did in case you run into any of the same issues that I did. My blog is hosted by 1and1 and some of the information may be specific to them.

This isn’t meant as a full upgrade guide – just a collection of tips that may help you.

First make sure you backup your data! There are some general wordpress backup tips on a post I did about a previous upgrade.

1. Export the SQL database

In the MySQL admin panel I selected these extra options: ‘Add DROP TABLE’ and ‘Complete inserts’, and then chose to save the file as a .gz (gzip) archive. If you need a free application to read .gz archives then I recommend 7-Zip.

Oneandone MySQL icon

2. Export the XML data

Export the XML post data from the WordPress admin panel (Tools->Export).

3. Zip and downloaded the blog files

Zip up the actual files on the server. On 1and1 the easiest way to do this is to logon to your admin panel, go to the Webspace Explorer, right-click on the directory and select ‘zip’.

You can then right-click on the zip file and choose download to copy it down to your computer.

4. Verify the data

I verified that the exported SQL data, XLM and .zip files were valid. The easiest way to verify the SQL and XLM data is to look at it in a text viewer such as NoteTab Light and make sure that the data at the end of the file is valid. Sometime a download can silently fail and you can end up with truncated data. If you try to restore the data from a truncated file then the restore will fail.

Verify the .gz file by making sure it will open in 7-Zip.

Click on the upgrade button

I finally was ready to click on the upgrade button. I clicked on it and a second or two later I got the message:

‘The update cannot be installed because WordPress 2.9 requires MySQL version 4.1.2 or higher. You are running version 4.0.27’

How I got around it

The partial answer is contained in the post here. However I’ll add a few bits of information on what I did differently.

I created a new MySQL 5.0 database from the MySQL admin panel. On the 1and1 business hosting package I think you can create two MySQL databases so you don’t need to delete the existing one first. Don’t delete it – you may need it if everything goes wrong with the upgrade!

I didn’t import the data by using the XML backup. I imported the data into the new MySQL 5.0 database from the gzipped SQL archive that I’d created in step 1 above.

You can import the SQL data from the MySQL admin panel by going to the tab to execute SQL commands, and then selecting the .gz file. Importing the SQL file through a .gz file gets around the 2MB size limit in the MySQL admin panel.

Importing from the .gz file rather than the .XML will import all your database data, and plugin settings, whereas if you do it from the .XML file you may have to manually re-enter various settings into your blog.

In your wp-config.php you will have to ensure that the DB_NAME, DB_USER, DB_PASSWORD and DB_HOST have been updated with the settings of your new MySQL 5.0 database.

Upload the wp-config.php file and if everything has gone right your blog should still be working and look exactly the same as before. Your blog will be using the old version of WordPress but will be accessing the data from the new MySQL 5.0 database.

You should now be able to click on the upgrade button and the blog should upgrade in less than 5 seconds.

This worked fine for me on 1and1. If you have loads of plugins or a heavily customised theme you may find more problems. If this is the case you can try deactivating plugins, or switch to the default theme.

If you really can’t get things to work you should be able to roll back to your pre-2.9 WordPress blog by restoring the files that you zipped in step 3 above. You MySQL 4.0 database should still be there (as long as you didn’t delete it).

Upgrading WordPress can often be a pain but at least having upgraded the SQL database from 4.0 to 5.0 should avoid more problems in the future. And now with WordPress 2.9 you can look forward to batch updating your plugins rather than doing them one at a time!

This blog is now powered by renewable energy!

Monday, April 28th, 2008

Green powered blog This blog is no longer powered by coal, oil, gas or nuclear. It is now fully powered by wind, water and solar power. This is because 1&1 webhosting (who provide the hosting for this blog) have now switched to a renewable energy supplier.

According to their news posting they have 40,000 servers consuming 50 and 60 Gigawatts per hour (GWh). Additionally the data centre only loses 20% of its heat (which is apparently very good) and can use outside air to cool the servers when the temperature goes below 10 degrees celcius.

Setting up a Wordpress blog on 1and1

Sunday, August 5th, 2007

Having decided to start a blog I had two main options for how to do it. Either create a blog using one of the many blog hosting sites, or host it myself on my own 1 and 1 web space. Hosting it myself is clearly the most flexible option, and for a techy like me the most fun. I did a bit of research into different blogging software and Wordpress to me looks good enough for me.

I was initially a bit worried about the amount of MySQL database space that is needed for blog software. 1&1 databases are limited to 100mb and I wasn’t sure how much space Wordpress would need. At work I manage a 5db database with the largest table having over 100 million rows so I’m well aware that databases can get big! Fortunately it seems that Wordpress uses space very efficiently and even very large blogs only need a few megabytes.

Wordpress comes with a load of documentation, but I did most of my setup by following the instructions on http://antbag.com/how-to-install-wordpress-with-1-and-1-hosting/ which has some good instructions specifically tailored for people on 1&1.

I’ve left the configuration pretty much at the default settings for now but I did add http://blogsearch.google.com/ping/RPC2 to the ‘Options->Writing->Update Services’ box so that Google Blog Search is notified for each update.