Search the site:

Copyright 2010 - 2024 @ DevriX - All rights reserved.

6 Steps to Move a Website to a New Domain Name

6 Steps to Move a Website to a New Domain Name

Your website’s domain name is a key part of your brand. When setting up your website, it’s one of the first things you’ll need to decide on. Over time, you might realize that your initial choice wasn’t the best fit or that your business has evolved to where the original choice doesn’t reflect your current brand.

The solution, then, is to change your website domain name. In this article, we will cover how you can move your website to a new domain name with as little hassle as possible.

Step 1: Pre-Planning

Before you start moving your website, there are several steps you should take to make the process easier.

Implement a Plan of Action

Below, we provide you with recommendations of what to do and when, along with suggestions for tools you might want to use to complete the task. Using this information you can create a plan of action so that you have a unique, step-by-step instruction sheet specific to your situation.

Cull and Clean Up Your Content

Over time, your website grows as you add written content, videos, images, and more. However, some of these might be no longer relevant, badly performing, or out of date.

If you decide that these items aren’t needed anymore, cull the files. You will free up valuable storage space on your WordPress web hosting environment, and the moving process will be easier since you are moving fewer assets.

Review Your Site Structure

Review your site’s files. It will be a reminder of your overall site structure and how all of your files fit together.

If, however, you have plans to change your site structure as part of your move, you should pre-plan any HTTP 301 redirects that you’ll need to provide in your .htaccess file (HTTP 301 redirects help your users find web pages that have been moved, even if the user only knows the pages’ old addresses).

For example, if all you’re doing is moving from http://old-domain.com/blog/postname to http://new-domain.com/blog/postname, then the process of setting up redirects will be fairly simple — requiring only one system-wide redirect.

However, if you move from http://old-domain.com/blog/old-postname to http://new-domain.com/new-folder/new-postname, then setting up redirects could be very complicated — potentially requiring redirects for each page.

Decide if You Will Be Moving to a New Web Hosting Provider

If your current WordPress web hosting plan isn’t meeting your needs (or you are unhappy with the services you’re receiving), consider moving to a new web hosting provider at the same time you move your website to a new website domain name.

By moving to a new host and opting for a domain name at the same time, you minimize the number of moves you have to make with your website.

Furthermore, some hosts offer free migration services or website transfer support to new customers, which would be a helpful service to have.

Step 2: Create Backup Copies of Your Files and Databases

In an ideal world, migrating a website should work flawlessly the first time. Unfortunately, that’s probably not going to happen, so one of the most important things you can do when preparing to move your website (either to a new host or just to a new domain name) is to make a backup.

Manual Backup

You can choose to back up your files manually (that is, you decide which files get copied to your backup location). Doing this requires the use of two tools: an FTP client and Adminer (formerly known as phpMinAdmin).

With the FTP client, you will backup the WordPress files responsible for the look and feel of your website (eg, themes and plugins), as well as the WordPress core you have installed). WordPress recommends the use of FileZilla, which can be used to back up your files with just a few clicks once you’ve installed and set up the client.

To backup your WordPress database, you’ll need an additional tool. The database stores posts, pages, user information, and more, and Adminer can help you back up these items.

cPanel Backup Wizard

Many WordPress web hosting providers offer their customers use of a cPanel Control Panel to manage their website’s environment. One of the features included in cPanel is the ability to create a full backup of all your files, email, and databases.

The upside to using the cPanel Backup Wizard is that you just need to initiate the backup. The wizard does the rest of the work, sending you an email when the backup is done and ready to download.

The downside, however, is that cPanel backups can only be used by cPanel itself — if you’re moving from a host that has cPanel to one that doesn’t, you won’t be able to use backups created using its wizard.

Plugins

For those who are less technical, do not want to manually backup their site, or are unable to use a cPanel backup, there are a variety of plugins that can help with this task. These include Duplicator, All-in-One WP Migration, and UpdraftPlus.

10 Bad Habits to Avoid When Managing Your WordPress Website

Step 3: Transfer Files to Your New Domain Name

Now that you’ve backed up your files, you can begin the process of transferring your files from your existing domain name to your new domain name. Again, there are several options available to help you with this process.

Manual Transfer

Just as you could manually backup files, you can manually transfer individual files and databases from your old environment to the new one. Note that, when manually transferring your website’s files, the order in which you do things matters.

The first things you should migrate are your databases (this can be done via Adminer). Next, edit your wp-config.php file, since it controls access between WordPress and your database (again, make a backup of the file before you edit it in case you need to roll back your changes). You should update the wp-config.php file with your updated database name, user name, and password.

Finally, you can upload the remaining files for your website, including those for your themes and installed plugins. Just as you used an FTP client (eg, FileZilla) for backing up these files, you can use an FTP client to upload the files to your new environment by manually selecting them.

cPanel

If both your old and new environments allow the use of the cPanel Control Panel, it is possible to restore your full backup. Depending on the hosting company you work with, you may need to reach out to the support team for assistance.

Plugins

Manual transfers can be quite time-consuming, and not all users can rely on cPanel for backup and site migration. That’s where plugins come in — there are plugins available that can help you move all of your website’s files, including WordPress’ own VaultPress, as well as Duplicator, All-in-One WP Migration, and UpdraftPlus.

Step 4: Add Redirection

Once you’ve moved your files, you’ll need to add redirection by editing the .htaccess file at your old domain. Because your website domain name has changed, you’ll need a way to send users automatically from the old link to your new link. Otherwise, they’ll see an HTTP 404 Page Not Found error.

If all you have done is change your top-level domain (eg, from http://old-domain.com to http://new-domain.com), then the redirect rule you need to add will be fairly simple:

#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://new-domain.com/$1 [R=301,L]

If, however, your site structure has changed considerably (ie, you’ve moved an entire section of your site into a subfolder) and this is reflected in your pages’ URLs, you’ll need to add individual rules for each page that’s moved:

Redirect 301 /old-page/ http://new-domain.com/new-page/

Step 5: Check for Broken Links

At this point, you have changed all of your URLs and set up redirects so that users can find your pages even if they have only your old URL. However, there is a chance that something got missed, especially if you make more complex changes to your URLs and need to add a large number of individual redirects.

There are several ways to check for broken links. If you are using Google Search Console, you can check for broken links (assuming that Google has had time to reindex your site since your changes). Alternatively, you can use a third-party plugin whose purpose is to look for broken links or a tool like URL Profiler or Sitebulb.

Step 6: Update Your XML Sitemap and Trigger Reindexing

An XML sitemap is a page that contains a list of pages on that website and how they relate (or link) to one another written using the XML markup language.

When moving your website to a new domain name (or whenever you change your URLs), you’ll want to update your XML sitemap so that it is correct.

XML sitemaps are a key tool for search engines, which use these pages to help them index websites and identify how various pages link to one another. Having a sitemap does not, in and of itself, improve your search engine rankings, but it does make it easier for relevant pages to be found whenever someone runs a search.

Once you’ve updated your XML sitemap, you can ask Google to reindex your website so that all of the URLs Google has cached can be updated. While you could rely on your redirects to send people to the correct URL, updating the URLs so that users don’t have to be redirected is a better practice.

6 Steps to Move a Website to a New Domain Name Infographic

FAQs and Other Considerations

You might think you’re done when the migration process is over, but there are still several things you need to keep an eye on and do when moving your website to a new domain name:

  • Watch your log files, both those generated by WordPress and any analytics suites you’re using. The biggest issue you’ll likely encounter is the HTTP 404 Page Not Found error. If you see any, fix them by updating your .htaccess file with the appropriate redirects.
  • If you have email addresses using your old domain, you’ll need to set up email addresses with the new domain. The steps required to do this vary depending on the registrar and the host provider you’re working with for domains and email, respectively. Alternatively, you could simply set up a new email address and have all emails sent to the old address forwarded.
  • Let people and Google know that you’ve moved! While the redirects you set up are helpful (and people will notice the change when their web browser redirects them), it’s nice to let your visitors and partners know that they can find you at your new domain. Also, update your Google Search Console account with the new name.
  • To choose the best type of WordPress web hosting for your site, you need to be clear about your needs. Key aspects to consider are website traffic, budget, speed, security, support, and reliability. Once the migration is completed, audit your site from a SEO and UX perspective. It’s good to hire an experienced UX and SEO consultant for this, to ensure that everything is left untacked.