How to Change Your WordPress Website’s Domain Name?

Photo of author

By Vijay Singh Khatri

Your website’s domain name allows visitors to find and access your website with ease. Certain projects require your website to get rebranded with a different name. In such scenarios, changing the domain name of your website becomes crucial. This article will explain how to change the domain name of a website created with WordPress. So, let’s proceed.

How to Change Your WordPress Website’s Domain Name?

Common Reasons for Changing the Domain Name of a WordPress Website

Here are some of the most common reasons for you to change the domain name of your website:

1. Rebranding

If you are willing to rebuild the company’s image, you would require a new brand name. It helps in reflecting the consistency of your rebranding strategy. 

2. Domain Extension Change

There might be a case that you are using an extension that is less popular, like .shop or .mobi. You may feel that the current extension of your website’s domain is not resonating with the audience and thus changing your domain name becomes a good idea.

Running a WordPress website on a subdomain like mywebsite.wordpress.com would also require you to change your domain name.

3. Too Many Redirect Errors in WordPress

In case you are encountering too many redirect errors in your WordPress website, it would be a good idea to change your domain name.

Steps to Change Your Domain Name

The steps that we are going to mention here to change your website’s domain name would be quite simple to follow for WordPress Developers. However, if you are a general WP user, you may find these steps a bit perplexing but surely they are doable.

Here are some prerequisites for changing the WordPress website domain name:

  • You must have access to your cPanel and FTP.
  • A new domain name is needed that is to be connected with the website.
  • Create a proper backup of all your website data.

Once you are assured of the above, you can proceed with the following steps:

1. Add a new domain to your hosting

Before you start using the new domain, you must add it to your hosting. Adding a new domain can be accomplished easily using the cPanel. All you need to do is to click on the Addon Domain Option within the cPanel.

Afterward, proceed by entering your new domain address, subdomain, and document root and click on Add Domain.

2. Copy the old domain folder and paste it to the new domain folder

In this step, you need to upload your website’s backup file. You can also choose to copy your previous website folder and paste it to the new location. If you are not switching your hosting, this process would be quite simple for you. Even if you migrate to a new hosting, you will be required to download the backup file of your website. Finally, you can add it to your FTP. All these can be done with cPanel.

3. Change the Site URL in wp-config.php

Proceed to open your new domain folder. You will be required to edit the wp-config.php file. Afterward, define the site URL along with the site home page for the new domain.

4. Update the database info

This is an optional step while changing your database. Updating the database info is required when you plan to change the hosting. Changing the domain name does not require you to change the database. Updating the database info requires you to upload the latest information. It is present within the wp-config file of your WP installation.

5. Clear the cache and refresh the browser

Once you clean the cache, all traces of your old database will be removed. Hence, it is recommended that you clean the cache. Also, ensure to refresh the browser. Finally, visit your new domain page.

6. Redirect old domain to the new domain

This step requires you to set up a permanent 301 redirect to your old domain name. This will help users who land on your website with the old domain name to be redirected to your new domain.

In order to set up a permanent 301 redirect, simply log in to your cPanel. Then click on the file manager and proceed to open up your website’s folder. Locate the .htaccess file and click on edit.

Put the below-mentioned code to the top of your .htaccess file:-

#Options +FollowSymLinks

RewriteEngine on

RewriteRule ^(.*)$

http: //www.newsite.COM/$1

[R=301,L]

Finally, replace newsite.com with the new domain name.

FAQs

1. Should I choose to change my domain name?

When the domain name of a newly established startup or business is changed, it brings changes in its overall branding. If you have new solutions, new keywords, new audience, etc., shifting to a new domain name can be a good idea.

2. Are there any effects on SEO when the domain name is changed?

If you change your domain name, it will affect your SEO to a certain extent. It will affect your search referral traffic temporarily while getting the redirects sorted out. If you are unable to redirect the old URLs, it will affect your SEO permanently.

3. How can one get WordPress off their URL?

You can get WordPress off your URL by following these steps:-

  • Go to the settings area present in the WordPress dashboard.
  • Remove the “/WordPress” portion of the site address URL.
  • Scroll down and click on the “Save Changes” button.

Final Words

The best thing about WordPress is that it has in-built URL address settings, which facilitate manual tweaking of the PHP code through a file manager or an FTP client. This aids in effectively bringing a change to your website’s domain name. You can try out the above-mentioned steps yourself to change your WordPress website’s domain name.

Leave a Comment