How to change domain name in WordPress web site?

If you are thinking of rebranding your business and the web site requires the domain name change, you should know that it is possible. We understand the stress this can cause, especially when you don’t know where to start and you are worried about losing data, but you don’t have to be, because here you can find the guide that will be helpful to you.

How to change domain name on the web site

 

Before you change domain name of your website, it’s good to know:

  1. Who is your hosting provider and where your domain has been registered.
    This is very important because you need a security password for your hosting package and interface for editing the DNS zone. If you haven’t registered the new domain yet, you can check and buy it on our website.
  2. What platform has been used for building your website?
    Nowadays, there are many different site builders like WordPress, Joomla, etc. and in all of them it’s possible to change domain name, but you need the administration login. The procedure of changing the domain names in the WordPress platform will be described in this article.
  3. Lastly, your skill level.
    If you can do this on your own it is great, but if you aren’t sure how to change domain name, contact your website developer or hosting provider. Like your hosting provider, we can help you with this change so don’t hesitate to contact us.

The domain name change needs to be a smooth process, so in the guide below you can find the steps you should take before switching.

1. Backup your website and download it to your computer

The first and crucial step is making a backup of your website, just in case anything should happen. There are many ways to create a backup and some of them are:

– Creating the full cPanel backup. Our Linux packages include the “Backup” option and you can download it to your computer. You can find the useful video for making the full cPanel backup here.

– Creating the backup using an FTP client like FileZilla. Login to your hosting package using FTP credentials and download data directly to your computer without the database. So, databases need to be exported from “phpMyAdmin” from Linux servers or “Database” section from Windows servers.

Useful articles which can help you, are:
Backup mssql database
Export mysql database

2. Start the migration to the new domain

When the backup is finished, it has been downloaded locally and all data is in the safe place, so you can go to the next step. The next step is – change domain name to a new one.


Change domain name in a few steps:

1. Ask hosting provider to change the primary domain

If the old domain name is the primary domain to a hosting package you should contact your hosting provider so that he could change the primary domain of the hosting package into a new one. Example, the name of the primary domain of your package is called “plus-hosting-test.hr” and you need to change it into “plus-hosting-demo.hr”.

a) Login into cPanel and on the right side you will see “Primary domain” like in Image 1.

Change domain name in a few steps

 

b) After your hosting provider changes the domain into “plus-hosting-demo.hr” you can see “Primary domain” like in Image 2.

 

It is only possible to do this action on the server, and only the administrator can change the “Primary domain”.

If the old domain name is addon domain, not primary domain, you can immediately get to step 2.

2. When the hosting provider changes the primary domain of your package the next steps are:

a) Change domain name in the database using SQL query via “PHPMyAdmin” options or download the database locally and search and replace old URLs with new ones. The third option is using the WordPress Search-and-Replace plugin.
In the “wp-config.php” file you can check which database is used by WordPress. The example of “wp-config.php” is given in Image 3.

 

Image 3. Database settings in “wp-config.php”

b) Changing the path into your database and files. When you use WordPress all your content could be transferred using one of the most popular migration plugins, like All-In-One WP Migration plugin or similar plugins like Duplicator, Migrate Guru, etc.

For transferring data from one domain to another, you should know that you need to have technical knowledge.

3. Tips and tricks

a) Using redirect. Generally, the 301 redirect is a permanent redirection from one URL to another. When all data from one domain to another is copied, we always suggest that the old domain needs to be active some more time. Do you know why? The main reason is your old visitors. They are used to the old domain name and they trust this site. Also, when they are looking for previous content they will be sent to the new location without effort. So, the best thing to do is keep the old domain name and set up redirects into cPanel or set up redirects rules into the .htaccess file. You can find a useful article on our blog: Kako preusmjeriti domenu ili adresu stranice?

b) Refreshing Google SEO. Changing the domain name impacts SEO and you should expect it will take a minimum of three months for the domain to be ranked again or even one year in some cases. When all content is migrated from the old to the new domain don’t forget to maintain the same keywords optimization, and to redirect the old domain and URLs to the new domain and URLs (setup the 301 redirects). If your old domain was verified in Search Console, submit a “Change of address”. If it isn’t, never mind, verify your new domain in Google Search Console so that you would have better rankings.

In case you are still uncertain how to change the domain name, feel free to reach out to our support team. We will gladly guide you through the process. Additionally, if you need a hosting package, you can buy it via our website.

Povezani članci

Odgovori