Tricking wORDpRESs when moving from one server to another server

WordPress Spelling by Lorelle
I had fun during the Dutch WordCamp. I learned from Lorelle that you should write WordPress with two capitals and not with 6 like I do in the header of this post. I’m teasing her again.

WordPress Future
At WordCamp Lorelle predicted a great future for WordPress. I teased her with my prediction that the future of WordPress will be gloomy, as it is much too technical and people wouldn’t want to go under the hood like I do sometimes. And I know Lorelle, you told us that you blogged long before WordPress even existed and had a hard job with manually copying and pasting thousands of your old html based blog posts into one of the first WordPress versions. My prediction remains that people will rather use the likes as Tumblr or Posterous, because they do not have such stamina as you have and sometimes I have – to a certain degree off course.

I believe my adventures with the migration of Happy Hotelier and Chairblog prove me right. It is too time consuming! In addition I believe that the longer you blog, the more chance you have corrupting your blog through several updates. I had far less problems migrating the Chair Blog which I started much later than Happy Hotelier.

It is easy to predict WordPress will have a great future if you are a star blogger like Lorelle who stayed blogging at the WordPress.com platform. It is freely available and very easy as the updating is being done almost automatically. The only problem is that you’ll never be sure when they will close down the service. Recently one of my favorite free applications has announced that they will close as of January 1, 2010 their services unless somebody steps in… I’ll be back on that later.

I really have put a couple of hours (too many!) in trying to find out what is happening exactly when moving from one server to another server.

Okay you faithfully back up, but do you know how to restore?
Back up Back up and Backup is the credo for all. But did you ever try to restore your WordPress installation?

There are a couple of issues nobody tells you when working with MySQL. There are several ways to make a backup of a MySQL database. If you want to find out you have to really dig into MySQL. Nobody tells you what the best way is. Nobody tells you you can get a restore so cluttered with wrong pointing links that you might as well throw it away. Nobody tells you there are limits of size involved. If your content is over a certain size you have to pull tricks to restore the stuff in parts. I didn’t manage to grab the moves involved and abandoned the experimenting. I would tell you if I knew the best way. In addition nobody tells you you can lose stuff underway. Nobody tells you you have to adhere to several different procedures with respect to posts, to pages and to attachments as photos or videos you publish on your blog.

I have the Wiley PHP5 and MySQL bible ( over 1,000 of pages) next to me for reference. Do you really believe I have the time to read and understand all that stuff?

It is not easy to simulate a restore and get a blog working again. About 2 years ago I tried that once using XAMPP a suite to simulate PHP and MySQL on your own computer. You can use it for testing purposes. But it handles only small installations.

To be honest: It may be becoming less and less important to know how that works as the WP functionality with the XML export and import are getting better each WP version.

Some people who have been following me, know that I have experimented with Linux time after time and time a new version was released, but time after time I have gone back to the not so much appreciated Windows system…because I don’t want to spend the time to grasp everything I need to understand to run a proper Linux system. I have the same feeling when working with WordPress sometimes.

Just a couple of random ranting thoughts.

What induced this ranting?
Yesterday I asked my ISP to make the change from my (their) old server to my new server. The change would take 24 hours because the DNS servers usually are being updated once every 24 hours….

In the meantime I had been experimenting with some necessary redirects on the old server and then on the new server all to prevent this blog from being inaccessible for some time… and then I ended up with a Happy Hotelier installation on the new server that did not work. So I re redirected the URL of Happy Hotelier back to the old server to keep my readers in the loop.

Currently this post is on that installation….

This morning I reinstalled WP and did a second export and a second import on the new server…. I don’t know how but this second installation got the comments right and also the categories…..It was ready just before the DNS servers really flipped the URL from the old server to the new server. The blog remained in the air during the transition which was somewhere around noon November 19, 2009.

So far so good.

Just by accident I have made the second installation with the use of a second database on the same server with another prefix than just wp_ .

During the afternoon I had other things to do and was busy. But my readers had something to read…

Tonight I thought “Hey! I have two different databases on the same WP installation…Why not try to reuse the former installation by simply swapping the wp-config file?”

And that worked and so today you see installation number 1 on the new server….

Tomorrow I will try to merge the best of the two….

I’ll keep you posted.

In any case I believe this is also a good trick to keep in mind if yo want to simulate a crash and be sure your “backups” are really working.

In one WP installation you can run two versions of your Blog as long as you make sure both versions have a different Database prefix… you simply flip your config file in.

Off course you cannot run the two installations simultaneously…but it is helpful. It is an alternative for experimenting with a WP installation in XAMPP, especially if XAMPP limitations will curb you.

My 2 cents for today…

Last edited by GJE on November 21, 2009 at 7:09 pm

Leave a Reply

Your email address will not be published. Required fields are marked *