After many months of poor service, frequent timeouts, and half-loaded pages, I moved the local blog I founded, Rockville Central, to a new host. I guess my first clue that I would really need to do something about this mess happened in a new client interview, when I was touting the site. My prospect pulled it up to check it out. He chuckled. “You’re site’s down,” he said.
But I didn’t act right then. No, I hesitated to move the site because I had been led to believe it is not an easy thing to move a WordPress blog. This blog is over three years old, with thousands of posts and uploaded images. But, my partner Cindy Cotte Griffiths and I have recently decided to grow Rockville Central and for that we needed a better platform. So, goodbye GoDaddy, hello Dreamhost.
I looked at a number of tutorials, and they all seemed to say slightly different things, and left out a thing or two. I thought I would write down what I did, what worked for me. This process is more methodical than some of the “five easy steps” tutorials I have seen, because I went in stages just in case things blew up. I decided I like the slow and steady approach for this task. So, here’s how:
- First, upgrade your existing installation of WordPress so it is the latest version. You can do this from within WordPress, on the admin panel.
- Copy your existing site to your computer. The best way to do this is to use an FTP program and just download the entire site. Yes, the whole thing. It may take a long time. Okay, now you have a backup in case everything goes wrong.
- Create a new folder on your computer for the new WordPress blog. It does not matter what you call it, but this will ensure that in subsequent steps you are only working on the new files, not messing with the old blog’s files. You want those pristine so you can go back if necessary.
- Copy the entire contents of the “wp-content” folder to the new folder you just created. Make sure you use the same tree structure as in the original.
- On your old blog, export all but the current month’s worth of content. This is done with the tools/export function. If you have a very large blog (like ours), try doing it year by year. You’ll do the current month of content at the very end, just before you make your new blog live. That way, if there are comments, etc., that come in while you are working you will not lose them in the switchover. When you press the “export” button, you may get taken to a page that looks sort of like a feed page. That’s becuase your browser is trying to render the export file as if it is a web page. If you get this (I did, using Chrome), “view source” for the page so you can make sure you see headers at the top that say it is a WordPress export file. If they are there, copy that source into a text editor like Notepad, and save the file with the extension “.wxr”.
- Sign up for hosting somewhere, and install WordPress. When you install the new WordPress, double check that it is the same version as your upgraded old blog. You’ll need to visit the admin page of the new blog once in order to force the install to configure the database. You might have problems doing that, because when you try to go to the new blog, you may have to type in your old address (if you set up your hosting properly) and this will take you to the old blog. Workaround: create a mirrored address for the new blog with a different url. Here’s how you create a mirrored domain in Dreamhost. Dreamhost has a special temporary holding host that you can use for this. (How this works: I signed up for hosting at Dreamhost, telling them I planned to host rockvillecentral.com there. Then I created a mirror of rockvillecentral.com that I called rockvillecentral.dreamhosters.com. To work on my new WordPress blog before I made it live to the world, I used the address: http://rockvillecentral.dreamhosters.com/wp-admin.)
- Upload the wp-content folder from your computer to your new new blog. This folder contains your old blog’s theme, plugins, and all uploaded photos. If you have a big blog, this can take a long time. I kept getting timeouts, so I went month-by-month with the photo uploads. (WordPress saves them by month, so that was easy — I just went a folder at a time). Okay, now you are just about ready to make your new blog just like your old blog.
- Open up the admin page of each (old and new) blog, in separate windows. Now comes the slightly tedious part. You want to configure your new blog so it looks like your old one, just without the content. So here is what you will have to do:
- Activate the proper theme (which you uploaded when you uploaded wp-content). If the theme is not there, you made a mistake in your upload.
- Create categories that are identical to the categories in your old blog. And (important) make sure the slug for each is the same as the old slug. Otherwise, when you import the old content at the end, you may end up with duplicate categories that you then need to clean up.
- When you go to the plugin page, you should see all the plugins from your old blog, only deactivated. Activate the ones you want to use. (I found that there were some on my old blog I wanted to abandon.) You’ll want to switch back and forth between your old blog’s admin panel and the new one as you make these configurations, to check you are making the proper settings.
- Configure your sidebar widgets. Again, going back and forth between old admin page and new admin page should make this easy.
- Finally, check the new blog’s look and feel. It should look just like your old one, only with one “Hello World” post.
- Import the old content. Okay, now you will make your blog really look right. Using the import tool, import the database .wxr file(s) you created when you exported your old blog. Now, test, test, test. Make sure it looks like you want. You will undoubtedly have missed something, so look closely. Give yourself a day to check back and look with fresh eyes. If everything is good, you can now move to the final steps. You should do these all at once if possible, so you have minimal downtime and no one comments while your blog is in transition:
- Export your current month posts from your old blog. Save the resulting .wxr file to your desktop.
- Import your current month posts into your new blog. Just like Step 9 above.
- Switch your DNS records on your domain registrar. You need to tell the world that your blog is now at a new place. To do this, you need to go into the control panel where you manage your domain and give it your new host’s dns server addresses. This is the step that makes your new blog “live.”
- Live like this for a while. This was a big move, so live with it for a while to make sure it’s working like you expect. If there are problems, try to fix them. If you can’t, you can always go back to the original blog. But, if things are working basically correctly, do the final step:
- Delete the old files from the old webhost. Because you have updated the DNS entries, you won’t be ablt to do this with your usual FTP program. You will probably have to do so from within your webhost’s administration functions. This will differ from host to host. Once you’ve deleted the files, go ahead and cancel the hosting account and it should all disappear.
Well, there you have it! Those are the steps that worked for me. It took me three days to do the prep, but I went very slowly, step by step. I did not want any down time. So I gave myself a week to do steps 1-9 Then, on Saturday morning, I did 10-12 quickly. I’m now in the middle of “living with it” to make sure all is well, and it seems like the switchover went without a hitch. In the next few days I will do step 14 (delete old) and will be alllllll done.
If you try this, let me know how it works in the comments. I will try to answer questions if I know the answers. I know it looks like a lot of rigmarole, but it was really pretty easy if I just went slowly. You can do it too!