Wednesday, September 16, 2015

The Simple Guide to Moving Your WordPress Site to a New Domain

moving

We’re SEOs and marketers, right?

Although we might know a bit of the technical stuff, that’s really more for developers.

But sometimes, hiring a developer to help out with something isn’t possible.

Maybe you can’t afford it, or maybe you would have to wait too long.

That’s where you need to take matters into your own hands.

One situation that every SEO faces at one point or another is having to move their site to a new domain.

It seems like it should be easy…Just copy and paste everything from domain1.com to domain2.com.

But if you’ve never done it before, it’s a lot harder than you think, and it’s easy to get frustrated.

Today, I’m going to walk you through moving a site from an old domain to a new domain—from a non-technical point of view.

I’ll be doing it within the context of moving a WordPress site, but 95% of it still applies to any other CMS. 

When is it time to move?

There are good and bad reasons for moving a website.

It’s a significant decision that will impact every part of your business, so consider it carefully.

There are three good common reasons to move a website to a new domain:

1. You’ve been penalized past the point of recovery - If you’ve been hit with multiple spam penalties and algorithmic penalties, recovery is a long and difficult road. If you didn’t have that much traffic to begin with, you might just want to start from scratch.

image13

2. You need to rebrand - Often, in a new business, you discover that you need to completely change your direction. Sometimes, you’ll want to start over with a new name and a new site.

3. You’ve gotten access to a much stronger domain - If you all of a sudden acquire an extremely authoritative domain in your niche (much stronger than your current one), switching to the new one may save you months or years reaching your traffic goals.

The only times when switching to a new domain is a bad idea are: when it’s a temporary fix or when it accomplishes nothing.

For example, if you have the “thin content penalty”, even if you don’t have it initially with a new domain, you’ll be hit with the penalty again if you don’t clean up the thin content. If you’re going to clean it up anyway, you might as well stay at the original domain.

In addition, don’t keep changing domain names just because you find a new one that sounds catchier. The domain name matters little in your business’ long term success as long as it isn’t ridiculous.

Assuming you have a good reason for wanting to move your WordPress site to a new domain, let’s get started.

Step 1: Prepare for the worst

The first step in moving your site is also the most important.

You need to create a full backup of your current site. This means that you need to download all the content on your hosting servers for your site.

This serves two purposes:

  1. You need a copy of the site to move – Eventually, you’ll need to upload the site’s contents to your new domain. You literally have to backup your site.
  2. It protects you from accidents - As non-technical people, we sometimes make big mistakes. If you mess something up, you can always restore your original site with your backup copy.

The confusing part is knowing what you need to backup.

For most sites (all WordPress sites), you’ll need to make a copy of two parts:

  • the database(s) – All the content you have written in posts and pages on your website is stored in databases. Databases are composed of tables, where your data is stored. Most WordPress sites will have several tables (e.g., one for posts, one for comments, etc.).
  • the (static) files – The static files are the backbone of your site. They include the basic WordPress files, theme files, and CSS files.

You’ll want copies of both parts. If you only have the databases, you can put all your content on the new site, but you’ll have to reconfigure all your WordPress settings and pick a new theme.

If you only have the static files, your new site will look like the old one, but without any pages or posts.

To download both of these parts, you have a few different options. I’ll go over them from the easiest to the hardest.

Option #1 – Use a plugin (BackupBuddy): WordPress has plugins for everything, including for backing up your site.

You can use a plugin such as BackupBuddy to back up both parts of your site in just a few clicks.

Once you install and configure the plugin’s settings, go to the “backup” menu in the plugin, and choose to run a “complete backup.”

This will make a copy of both your databases and static files.

image17

Once you do that, give it a few minutes to create your backup.

Then, you can either download a copy of it or send it to cloud storage—the choice is yours.

image43

That’s it—very simple.

The downside is that the plugin is not free. However, if you really want to go the plugin route with no cost, you can try other free WordPress backup plugins.

Option #2 – Use Cpanel’s backup functionality: Most popular hosts offer access to Cpanel.

If you do have access to Cpanel, it’s also pretty easy to make a backup.

Log in to your Cpanel, and look for “Database Wizard” under the “files” section of the main dashboard.

image20

From there, just follow the three simple steps.

First, choose “backup”:

image01

Next, you’ll have to choose what kind of backup you want to make.

This is where you might make a mistake if you’re not paying attention.

You would think that you’d want to make a “full backup,” but you don’t. The reason you don’t want to make a full backup is because you can’t restore a full backup later on, which will make moving the content to your new domain a hassle.

Instead, you’ll have to make a few “partial backups.”

You’ll need both the “home directory,” which will contain all the static files in your hosting account (could be more than one site), and the “MySQL databases,” which are your databases.

image31

Click either one of those, which will load the third step. Click the download button to download a copy, then click “go back,” and do the same for the other part of your partial backup.

image00

Now, you should have a copy of your databases and static files somewhere on your computer or a hard drive. It’s not a bad idea to make a few extra copies—it only takes a second.

Option #3 – Do it the hard way (manually): If for some reason the first two options don’t work, use this last option. It’s a bit harder but still not too complicated if you take it step by step.

First, let’s start by backing up your databases.

In whatever hosting panel you have, there should be a link for “phpMyAdmin”:

image36

Start by selecting the “Databases” menu option at the top:

image03

The menu will show you a list of databases (if you have more than one).

You’ll need to pick the ones used by the site you’re moving.

After you do, you’ll see a list of all the tables it contains:

image05

It’s pretty obvious what each of the tables contains. “wp_posts” contains your posts’ text, while “wp_comments” contains the text of all the comments made on your site.

Select the “check all” button at the bottom, then select “Export” in the dropdown menu right beside it:

image10

Finally, choose the “Quick” export method, leaving the format as “SQL.” Click “Go,” and the download will automatically begin:

image02

Next, you need to back up your static files.

With this option, you’ll use FTP to transfer the files from your web server to your own server (your computer).

If you don’t already have an FTP program, download FileZilla (free).

You’ll need to connect FileZilla to your hosting account. This part can be frustrating as the login details for every host are different.

Search Google for:

what is my ftp login + (name of your host)

Most will have a help page that will help you find your login information. Otherwise, contact support.

Once you’ve figured out your login information, the rest is quite simple. You can copy, paste, and drag files from your server to your computer (and vice versa).

image32

In this case, navigate to the “public_html” folder of your hosting server.

If you only have the one site in your hosting account, just copy and paste the entire folder to your computer.

image22

If you have multiple WordPress sites in your hosting account, download the folder inside of “public_html” corresponding with the site you’re moving.

Now, you should have both your databases and static files on your computer. It’s a little more difficult than the first two options, but it will work.

Step 2: Set up your new home

It’s time to get your new home ready for your furniture (content).

If you’ve already registered your new domain and put it on a hosting server, you can skip this step.

Otherwise, once you’ve registered your new domain name, look for domain name server (DNS) options within your registrar (e.g., NameCheap, GoDaddy, etc.).

image23

The DNS servers tell the registrar where the site is hosted.

You need to get your DNS addresses from your hosting provider.

Most hosting providers will send you an email after you register with two or more DNS server addresses in it. If you can’t find them, contact your host for support.

Add these addresses as custom DNS servers (back in your domain registrar):

image28

Save the changes.

Sometimes, it only takes a few minutes for the changes to take effect, but it can also take up to 24 hours.

To check if the changes have taken effect, use a DNS check tool. Enter your new domain to see which DNS servers come up:

image41

You’ll know your changes have taken effect once you see the new addresses in the result.

Step 3: Upload your old site

We’re getting closer!

With all your stuff packed up and your home prepared for it, you can start uploading the databases and files to your new domain.

Essentially, you’re going to do everything you did in Step 1, but in reverse.

Start by creating a new database: Most non-technical people make the mistake of not creating a new database on the new hosting account for the new domain—you need to.

In Cpanel, select the “MySQL Database Wizard” from the “Databases” section:

image20

The first step is to choose a database name. You can pick whatever you want, but I recommend something that describes the site. Enter it into the blank space, and click “Create Database”:

image14

Write this down! You will need it later.

Next, it will ask you to create a user for that database. Create a username, and choose a password:

image04

Make sure to record your username and password somewhere safe.

Finally, you get to specify which privileges that user has in that database.

Since this username is for you (and you only), you should choose “all privileges”.

image34

Click on the “Next Step” button to finish up.

Next, edit your wp-config file: This step is where you’ll need the name of your new database and user.

Open your static files’ backup.

Find the file called “wp-config.php”—it should be in the main folder. Then, open it in a text editor.

image21

You need to enter the following:

  • database name
  • username
  • password

You’ve created all of it just prior to this step.

This tells WordPress that it should look for all the WordPress content inside that new database.

Of course, we’ll have to upload your old database’s tables into that new database, but we’ll get to that soon.

Option #1 – Uploading your site’s content with a plugin: Just like you can use a plugin such as BackupBuddy to back up your site, you can also restore a site using it.

First, you’ll need to install a blank copy of WordPress. Then, you’ll need to install the plugin of your choice.

image37

Once you have done that, select the “restore” function of the plugin, which will guide you through the restore process.

First, you’ll need to upload the file that it gave you when you ran the backup.

Then, you’ll need to enter the database information from before. If your plugin has these options, then you can skip the step of editing wp-config (above) because the plugin will do it for you here:

image42

Once you finish the setup, give the plugin some time to upload the content (it could take up to an hour, depending on the Internet speed and site size). Then, you should be ready to move on to the next step.

Option #2 – Upload through Cpanel: Your second option is to go through Cpanel again.

Click the “Backup Wizard” icon again:

image12

But this time, instead of clicking “Backup” on the first screen, pick “Restore”:

image29

As you can see from this next screen, there’s no way to restore a “full backup,” which is why we did the partial ones in the first place.

Click on the “Home Directory” to restore it first:

image33

Then, use the “Choose File” button to select the backup file with all your content files in it. Then, click “Upload.”

Depending on the size of your backup file, this could take a while, so be patient and don’t navigate away.

image39

Once the process finishes, go back to the second screen, and click on the database restore option. Again, select the database backup you made before, and give it time to upload.

Option #3 – Uploading the hard way (manually): Finally, if you created your backup manually, you can also upload your content manually to your new server.

Start by connecting your FTP software to your hosting account (if it’s a new one, your login will change here).

Then, drag and drop all your backup files into the “public_html” folder of your new hosting account (or create a subfolder for your new site).

image27

It will show you the uploading progress on the bottom bar of the software.

Wait for it to finish.

Now, you can upload your database tables to the new database you created a bit earlier.

Click the “database” menu option like you did before, and select the new blank database you just created.

Then, click on “Import” in the top menu. Use the “Browse” button to select the tables from your old database (from your hard drive):

image35

Finally, click “Go.”

If all goes well, you should get a success screen shortly.

Step 4: Few moves go perfectly

Done, right? Not quite.

You should be able to load your new site and see your content. It should even look pretty good.

But there are still quite a few small things you need to check or fix.

Let’s tackle them one at a time.

First, crawl for broken links: Chances are you didn’t fix old broken links on your site (at least not all), so now’s a good opportunity.

Enter your homepage into this free online broken link checker (free for small to medium sized sites), and enter the security code.

image38

Run the tool, and you’ll get a list of your broken links below (give it a few minutes).

image30

Fix the broken links found by the tool.

Second, check through the pages manually: In theory, all your layouts and settings should be exactly the same, but sometimes weird things happen during moves.

Spend 5 to 10 minutes visiting different pages on your new site to see how they look.

If you see anything wrong, fix it or make a note to fix later.

Third, make sure WordPress settings haven’t changed: In the same vein, WordPress settings sometimes get changed or toggled for no good reason.

Go back through all your different setting panels, and make sure that everything is the same as it was before:

image24

Similarly, plugins sometimes get deactivated during the move, so check to see that all of your plugins are active:

image06

Fourth, update internal links to point to the new domain: In the second little check, you probably noticed that it’s hard to navigate around your new site.

Why? Because all your internal links still point to your old domain.

Let’s fix that.

The simplest way to do this is to use a plugin such as the Velvet Blues Update URLs plugin.

Once you install the plugin, enter your old and new URLs, and then check the first four boxes before selecting the update button:

image15

Instead of you doing it manually, this plugin will take care of it in seconds.

Step 5: Give your site a facelift

It’s easy to obsess over all the small details of a website.

Even on a great website, there are always opportunities for improvement.

For the most part, you’re better off ignoring them. Otherwise, they’ll take up all your time.

However, some parts of your new site will need a change, and it might be a good time to improve some other areas as well.

Start with a new logo: Your logo is the cornerstone of your brand. When you move your site in order to rebrand, you should start with your logo.

For a high quality logo, I recommend 99designs.

You can purchase a package specifically for logo design, which means that you’ll have specialists working on yours.

Although it might seem expensive at first, it’s actually pretty cheap for what you’re getting.

When you post a project, 30 or more designers will create their versions of your logo for you. You get to pick the best one.

image07

Do you need a new theme? The Internet is constantly evolving. Design styles and techniques go in and out of popularity.

If you want to have a leading site in your niche, you need to stay up-to-date because design plays a role in forming customer trust.

If your old site had the same theme for a long time, consider updating it to a new one.

A new site often deserves a new theme to reflect it.

Step 6: Don’t forget the SEO

At this point, you have a functioning website. Congratulations!

But if you’re not careful, you could lose your existing search traffic, at least temporarily.

Follow these five steps to minimize the impact that moving your site to a new domain might have on your search traffic.

Step #1 (optional) – redirect old pages: You likely still have visitors going to your old domain, whether they get there from search engines, old links, or bookmarks.

One of the most important parts of a site move is to redirect each individual page on the old site to the corresponding page on the new site. This way you ensure that all your visitors will be sent to your new site.

The reason why I said this is optional is because if you created a new site to escape a penalty, you may not want to redirect the old pages to the new ones as that could pass the penalty along.

If you are going to redirect your old pages, you want to use 301 redirects, which are permanent redirects. This is the only way to pass along most of the original pages’ SEO value.

You’ll need to log into your hosting account of your old domain, and find the .htaccess file in the main public_html folder.

At the bottom, you can enter the code to redirect your old pages.

You have two main options.

First, you can redirect the whole site. If you’re keeping all the URLs exactly the same on the new site (other than the domain name, of course), you can paste this simple code:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^example.com [NC,OR]

RewriteCond %{HTTP_HOST} ^www.example.com [NC]

RewriteRule ^(.*)$ http://example.net/$1 [L,R=301,NC]

Change the italicized domains to your old domain name, and change the bolded one to your new domain name.

If someone goes to a URL on your old site, it will automatically redirect them to the same URL on the new site:

image18

Your second option is to redirect them all individually.

If you’re planning on deleting content or moving it around, or even changing the URL structure, you’ll have to add this to your htaccess file:

Redirect 301 /oldpage.html http://www.xyz.com/newpage.html

The italicized URL is the page on your old domain that you want to redirect. The bolded one is the full URL of the page you want the old one to redirect to.

You’ll need to do this for every URL that you want to redirect. Obviously, it could take some time if you have a large site.

Step #2 – add to Google Analytics and Webmaster Tools (Search Console): You should add your new domain to both Google Analytics and Google Webmaster Tools (WMT) as soon as possible.

Start by logging into Google Analytics and clicking the “Admin” menu option at the top.

You can create a whole new account for your new site or just add it to an existing account as a new property.

Click on either the account or property drop down menu, and click “create new” at the bottom of the list:

image25

Setting your site up is pretty simple: just give your site a name, and type in the new domain name:

image09

The final part of activating Google Analytics is to install your tracking code on the next page.

image08

You’ll need to copy the tracking code and put it on every page of your website that you want to track.

You can either paste it right into your header.php file or use a plugin if you’re not comfortable doing that.

image16

Next up is Google Webmaster Tools (Search Console).

Once you log in, your main dashboard will load, where you can select the red “add a site” button:

image11

Once you type in your new domain, you also need to verify that you own it.

Choose whichever method you prefer (Google Analytics is the easiest).

image45

Step #3 – update your keyword tracking: Keyword rankings are one of the most important metrics for SEOs.

In order for them to be useful, you need data to be collected over a period of time.

When you move to a new domain, it’s important that you set up whichever keyword tracking tool you use to track your keywords for your new domain, not the old one.

If you forget, you’ll have an even longer waiting time before you collect any useful information.

Step #4 – fill out the change of address form in Webmaster Tools: Google knows that a new site is going to lose some search traffic while it gets updated in the search engine’s index.

However, it provides a way to speed up this process with the change of address tool.

It tells Google that one of your sites has moved to a new domain, which will minimize any harm to your current rankings.

To use the tool, click the gear icon in the top right of Webmaster Tools:

image40

Choose the “Change of Address” option.

There are four steps to using this tool.

If you haven’t added your new domain to WMT, do so now (with the “add it now” link). Otherwise, pick your new site from the drop down menu in step 1.

The next two steps just require you to click the “check” and “confirm” buttons, basically telling Google that you think you’ve done everything up until this point correctly in your move:

image26

Finally, click “submit.”

Step #5 – submit your new sitemap: The final SEO concern that you must address is adding a new sitemap to WMT.

Create a sitemap for your new site if you haven’t yet, and then go into your new site in WMT and navigate to “crawl > sitemaps”.

image19

Click the “Add/Test Sitemap” button in the top right, and then enter the address of your new sitemap:

image44

Submit the sitemap, and if all goes well, it will ensure that Google continually indexes your new site.

Conclusion

Moving a WordPress site, or any site, to a new domain takes a lot of work.

However, if you follow this guide, you’ll see that it’s not very difficult to do even if you aren’t the most technical SEO or marketer.

I advise you to take your time and complete this process slowly. That way, you’ll avoid making any rush decisions that might mess up your move.

If you’re not sure about a step along the way, don’t just guess.

If you have a question, search for an answer on Google, or leave me a comment below with the question, and I’ll try to help you.

2 comments:

  1. Backup your files before you get started.
    Sign in to your current web host provider to access your WordPress files (a File Management tool is one example).
    Export your database files.
    Download your WordPress content folder
    Create an FTP account to be able to upload your backed-up WordPress content folder for your new WordPress site
    for more information click here: HOW TO MOVE WORDPRESS SITE TO THE NEW DOMAIN

    ReplyDelete
  2. One of the most important parts of a site move is to redirect each individual page on the old site to the corresponding page on the new site. This way you ensure that all your visitors will be sent to your new site.
    see this
    learn this here now
    directory
    why not find out more
    navigate to these guys
    see this here
    check my site

    ReplyDelete