There may come a day when you need to switch domains. (And perhaps today is that day.)

It might be that the brand name you chose years ago doesn’t properly explain what your unique selling proposition is anymore. Maybe you are transitioning from a branded domain to a personal domain. Or vice versa.

Whatever the case, if you are going to do it yourself (which is completely possible), you’re going to want a step-by-step guide to follow.

Corbett has transferred WordPress to different domains multiple times over the past few years. I just went through this whole process last weekend for the first time and had my fair share of opening up Google and starting my search with “how in the world do I…”

There were also a number of things that completely broke for me in an embarrassing way (like sending 10 emails in a row of old blog posts that I didn’t want sent to my entire email list).

But in general, moving WordPress to a new domain can be pretty seamless with a little planning. If you have a strong reason to rebrand or move domains, this post will help.

This guide will help you manually transfer your domain and fix many of the problems that may arise from doing so.

(Quick note: Transferring your domain manually can be tricky. If you are worried about messing things up or that you don’t have the technical skills to do it, we recommend that you use the WordPress plugin BackupBuddy, which automates much of this process. Keep in mind that the steps below about podcasting and your email list will still need to be addressed even if you use BackupBuddy to do the transfer.)

Alright, let’s get into it.

1. Backup WordPress Databases

The first step is to backup the WordPress database on your original domain (henceforth referred to as the “old” domain). Note that backing up your database doesn’t completely backup your theme, widgets, plugins, etc. Those will be handled separately.

(If you want to back up your entire WordPress install, including what I just mentioned, your best option is to use BackupBuddy. Heck, you should be using the plugin for backups on a regular basis anyway, even if you aren’t transferring domains.)

If you are merging two WordPress installs together you’ll want to backup both of the WordPress databases. If the install on the new domain is a fresh WordPress install though, you won’t need to worry about it.

If you don’t have BackupBuddy there are a bunch of free WordPress plugins that allow you to backup/download your WordPress database. This one worked for me.

Save a copy locally, save a copy in the cloud, and save a copy on a old AOL floppy disk from the 90’s. You don’t want to be without your database.

2. Export & Import Content

The next step is to export your posts and pages from your old domain. To do so, log in to your WordPress admin panel and go to Tools > Export.

Screen Shot 2013-07-29 at 1.29.34 PM

From there make sure “all content” is selected and then export the data.

Now go to the new WordPress install and go to Tools > Import. From there you can import all the content from your previous domain. Just select the export file you created from your old site.

3. Migrate wp-content/uploads via FTP

Next you’ll need to manually transfer your WordPress uploads folder via FTP from your old domain to your new one. This folder contains all the images and other files in your blog posts that you uploaded using the WordPress interface.

This step isn’t too hard. First, log into the FTP of your website using your favorite FTP program. (I use Transmit on the Mac.)

Screen Shot 2013-07-29 at 1.31.35 PM

Navigate to root folder of your domain and copy the wp-content/uploads folder onto your computer. Now transfer the uploads folder to the same place on the new domain.

(Note: You’ll have to “merge” the two folders if you have existing uploads on the new domain. If it’s a fresh WordPress install, you can just replace the entire uploads folder.)

4. Re-Install & Configure Theme

This is another step where it really helps to use BackupBuddy.

Because I like to do things the hard and manual way… I had to reinstall my WordPress theme, Thesis, and manually copy over all of the custom code I’d put together. Specifically the custom.css and custom_functions.php files.

I also had to manually update the site options (which included font scripts, Google Analytics code, etc.) and the design options (font sizes, column widths, etc.).

It is an extremely manual process to have both of the WordPress installs open and copy+paste HEX values for font colors.

Your mileage may vary here. Some themes have an “export options” button that will make this process somewhat easier. Consult your theme documentation for further instructions.

5. Reinstall & Configure Plugins

Plugins are another part of the WordPress install that don’t get transferred over with the Export & Import process described so far.

Not only will you need to search, find, and reinstall all of the plugins, but you’ll also have to reconfigure them. Depending on how many plugins you use this may take a while.

The easiest way to do this is by having windows of both the old and new domains open at the same time and going through all the settings at the same.

6. Update Widgets

Any sidebar or footer widgets in your WordPress install will not be present on the new domain. You’ll be manually replacing links to old domain pages, images, and files here.

Open your old domain’s WordPress panel and navigate to Appearance > Widgets. Then manually copy + paste all of your text widgets or recreate the widgets.

7. Search And Replace Your Domain Name

Now we’re getting into the good stuff. To make sure all of the links within your site will go to the new domain instead of the old domain, install the Search And Replace plugin. I used version 2.6.5.

Once you have this plugin installed, all you have to do is a search and replace of your old domain name with your new one.

Screen Shot 2013-07-27 at 9.26.28 AM

For example, I was transitioning from pocketchanged.com to calebwojcik.com so I just did a simple search and replace to change ‘pocketchanged’ to ‘calebwojcik’.

Boom. Simple as that. Be careful with this step. Having a backup is critical here, because this search and replace is very powerful since it works directly on your database. Double check your spelling before proceeding, and consider any repercussions that could result from a mass search and replace operation.

8. Update All Shortlinks

If you use a plugin like Pretty Link to create shortlinks to specific URL’s then you’ll have to re-create those manually as well.

9. Update Podcast Episodes

When you do a search and replace on your website there may be URL’s you don’t want changed. For me, that was the URL’s to my podcast episodes hosted on Libsyn.

I went to each episode’s blog post and manually changed the link back to the MP3 to the proper URL.

10. Update Feedburner

If you are using Feedburner (or Feedblitz) for an RSS feed you’ll need to update it as well.

The main place you’ll need to make changes is in the Feed settings. Update the “original feed” to your new domain name.

Screen Shot 2013-07-29 at 12.14.33 PM

It is up to you whether you want to update the “Feed Address” though, because if you do then your previous feed will no longer work (i.e. people will have to resubscribe via RSS).

You’ll also want to go through the rest of your Feed’s settings to change any mentions of your old domain or brand to the new one.

11. Update Email List & “Blog Broadcast”

Inside your email list provider there will be plenty of things to update.

You’ll want to update the names of your lists (which might break your opt-in forms, so make sure to test them). You’ll also need to update any mentions of the old brand, old email address, etc.

Now for the biggest mistake I made during my domain transfer.

I left the “blog broadcast” setting to automatic in Aweber and a day after my feed updated Aweber blasted ten emails out to my list. By the time I heard from Aweber it was too late.

What happened was that Aweber pulled ten random posts from my archives (some from over a year ago) and decided to send all of them out, at once, via email. What a nightmare.

To make sure this doesn’t happen you to, change your blog broadcasts to manual during your domain transfer.

12. Create a 301 Re-Direct

Okay, so if you’ve made it this far, well done. This is a long process.

This step is the most important one because this is what will actually cause people that visit your old domain to be redirected to your new domain. And not just the homepage, but every individual blog post and page too.

To do this step you’ll need access to the FTP of your old domain again.

A) In the root directory you should find a file named ht.access. (If you don’t, just make one in a text editor and upload it to the root folder of the old domain.)

B) Open that file in a text editor (TextEdit on Mac or Notepad on Windows).

C) Add a 301 re-direct to ht.access file right after the “RewriteEngine On” line that reads:

Redirect 301 / http://newdomain.com/

Here is the full text in my ht.access file at my old domain as an example:

BEGIN WordPress

 RewriteEngine On
 Redirect 301 / http://calebwojcik.com/
 RewriteBase /
 RewriteRule ^index.php$ - [L]
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
END WordPress

This will now redirect all traffic from your old domain to your new one. Again, test to make sure it is working.

13. Submit XML Sitemap to Google

Okay, here’s the last important step. Search engines need to know that you transferred domains and where all of your content now lives. The best way to do this so you don’t lose any SEO is to generate and submit your XML sitemap and submit it to Google.

To do this, all you need to do is install the Google Sitemap XML plugin, go to Settings > XML Sitemap, and then submit your sitemap to Google.

14. Test, Test, Test

Pour yourself a caffeinated beverage and start clicking around your new domain.

Test the major pages of your site to make sure they all work. Then go through your most recent blog posts, the sidebar, the footer, and anything else you think might have broken. It is better that you find the problems and fix them yourself than to have someone in your audience find them.

Additional Resources:

I referenced a bunch of other guides online to figure out how to do this on my own. Hopefully this guide covered all of the steps in plenty of detail for you, but if not, here are a few of them.

And once again, if you’re doing this on your own, you really should consider using the BackupBuddy plugin. It has a migration tool built-in that will automate steps 1 through 8 above for you and will save you a bunch of time and potential errors.

Have you migrated domains before? Have any tips or potential pitfalls to share? Would you change any of the steps above? Let us know in the comments below.