And without losing any traffic or getting a SEO penalty.
After moving back to Canada in April, we needed to change our domain name. We couldn't rightly use the name BloggerAbroad, if we weren't abroad anymore. So earlier today I moved the complete WordPress site from bloggerabroad.com to bryanhaines.com.
Here's how I did it:
How To Move a Site to a New Domain
There are many ways to move a site. You could export the database and then reimport it into a WordPress installation on your new domain. The problem with this is that it won't maintain any of your customizations – including sidebars, headers, footers or themes. Only your posts, pages and comments will be saved. You could have to rebuild the whole site! Obviously, this is a last resort.
There is a better way. And it only took about 30 minutes. (It took me longer to write this post, than it did for me to migrate the site.)
I've been using BlogVault for years to keep our sites backed up. Last year, I used this app to auto restore my daughters site. It had been hacked and in a matter of minutes I was able to restore the site to its original state, before the hack.
In addition to the site backup function, BlogVault also does site migration (included with your subscription).
- subscription with BlogVault (a single site service is all you need)
- a new domain (learn about choosing a great name)
- your hosting ftp details (ftp server address, username and password)
- a basic install of WordPress (no theme or plugins) on your new domain
With these details, you're ready to get started.
After logging into your BlogVault account, choose “Migrate-Site” option from the menu. You might need to select “More Options” to see this.
On the next screen (pictured below) you'll need to enter your ftp credentials.
You are looking for this folder: public_html/
Inside of this folder, you'll find another folder named after your domain. In my case, the folder was named bryanhaines.com Simply select your folder and click “continue”.
Now BlogVault will move your complete WordPress site to your new domain.
More than just move files, the application also updates the complete file structure – renaming all internal links to match your new domain. I didn't have to fix any broken links from the migration! This one feature saved me countless hours of sifting the pages and rebuilding the cross links in the site.
Now you can check out your new site – everything should be identical.
A few things to remember:
- Your login credentials will be the same as before. You can forget your username/password from when you setup the initial WordPress install on your new domain. That information was overwritten when you migrated the site.
- You need to update your social networks, Google Webmaster Tools, and email signatures with your new url.
- You will likely need to change your logo and site metadata to reflect your new site name / url.
But now what do you do? You have two identical sites!
How to Avoid SEO Penalties
Now that you have a functioning cloned site, you need to put a few things in place to maintain your SEO ranking and help visitors see your new site.
Maintain SEO Ranking after Moving to a New Domain
- Create a 301 permanent redirect
- Notify Google Webmaster Tools of your change of address
To create a 301 redirect, you'll need to modify your .htaccess file. Don't worry, this is very easy.
To do this, you'll need FTP client software. I prefer FileZilla (it's free and powerful). This is software that you'll download and run from your computer. You will use this software to access your server files and make a very small adjustment in one file.
To log in to your server using FileZilla, you'll need the same details as you used above (ftp credentials) to migrate your site. Once you connect, you will navigate to public_html/. Inside of this folder you will find your old domain folder. Inside of this folder you need to find a file called .htaccess. This will be in the root of your domain folder.
To make your modification, just right click on the file name and choose “View/Edit”. Then you need to add one line of code/text.
The file will open in a text editor (likely Notepad). Under the line: RewriteEngine On copy/paste the following line of text: Redirect 301 / https://bryanhaines.com/ (be sure to insert your domain name in place of mine). See image below:
After entering this information (and not changing anything else) you'll choose “Save” and your modified .htaccess file will be uploaded to your server. To test, just visit any url from your old domain. It should automatically redirect to the same page on your new domain.
Advising Google of your Change of Address
This last step is very important – especially if you are getting any traffic from search engines. You need to tell Google that you moved your site to a new domain. Here's how to do it:
Inside of Google Webmaster Tools, you will visit the site details for your old url. Click on the gear and choose “change of site address” tool. This will bring up the following menu:
On this screen, you'll choose the new site from the list. Google will also test that your 301 redirects are working properly and that both sites are properly verified (confirming that you are the owner of both domains). Once you click submit, you can just sit back and relax.
Congratulations! You have successfully moved your site to a new domain – and avoided any SEO penalties. Learn more about SEO keyword research.
Other Site Migration Considerations
Now that your site is up and running, there are a few fine details to consider. Not all are required, but they should considered:
- Google Analytics code
- social media accounts
- New logo
- SEO metadata
- adjust links and references to your new domain from your other sites
- change Google Adsense code
- disable any scheduled posts on your old domain
And lastly, be sure to test, test, test your new site. It's important to double check site structure and cross-links. Mistakes can happen – it's best to catch them early.
Have a tip or challenge with your WordPress site migration? Please share it below!