“… changing your IP address, webhost, domain name, blog template, and blog version all at the same time is the exact opposite of what you should normally do. It’s better to change only one thing at a time so that if something goes horribly wrong, you can trace what caused it.”
- Matt Cutts (http://www.dullest.com/blog/switching-things-around/)
Why move a website?
First and foremost, why would you move a website? Well there’s a few reasons that I can think of right off the top of my head:
- Your old domain name was inappropriate
- You lost your old domain
- You decided to change focus
- You started on a sub domain and related to a full
What ever the reason, sometimes we have to move domains so the real question is … how do you do it right?
How to move a domain properly
Moving WordPress
First, lets assume that you’re using WordPress.
- Log into your phpMyAdmin or control panel and export the WordPress database to an SQL file.
- Save the SQL to your hard drive and open it in a text editor
- Search for the path of your old domain (i.e. thisismyurl.com) and replace it with your new domain (i.e. getawaygraphics.com) If you’re changing the path, (/blog/) to the root or something as well please make sure to search for the whole string!
- Search again!
- Change your server paths. This is a UNIX friendly path that the server uses to identify where you are on that hard drive. For example it may look like /var/www/t/thisismy/public_html/. If you don’t know your server path use my phpinfo() plugin for WordPress to find it.
Installing WordPress on a new domain
Now that you’ve altered your SQL for your old WordPress website,
- Install a copy of WordPress on your new domain
- Open your phpMyAdmin or control panel and paste the edited SQL into your SQL query box
- Wait …
- Open your new website in a separate web browser. Assuming everything worked, you should be up and running.
One final note, I always like to re-save my permalink options at this point to ensure the server writes a proper .htaccess file as sometimes it seems to act up.
Search Engine Optimization for the new domain
Next, you’ll want to make sure that the search engines know that you’re new domain is the correct domain and that your old domain is no longer active. You can do this using what is called a 302 redirect. Pretty fancy right? Not really, we’re geeks but … it’s important and that’s where Matt’s post Switching things around comes in handy.