Changing Sites Domain Help

georgetoons

Elite Member
Jr. VIP
Joined
Feb 9, 2023
Messages
2,211
Reaction score
1,568
Hi bhw fam,

So I need to change the domain of my website, just not so sure on the whole process.

How should I go about it? When I change the domain through whm will all site links change in the site automatically?

Also I will be redirecting the previous domain traffic to the new one. Will I need to redirect each link 1 by 1? There is thousands of pages could I just redirect everything to the home page?

Thank you all in advance
 
The simple way:
You can use any WordPress migration plugin (you name it) or Softaculous (built inside cPanel). Below are the steps for Softaculous:
  1. cPanel > Domains > Create new domain;
  2. Configure the nameservers;
  3. - Softaculous > Export old site > 3.1 - Import the backup to the new location;
  4. The redirection should be auto-configured through WordPress (media path, etc). If not, see the code below about how to change the urls in the db. You can also use a plugin for this task.
  5. WMT > Add new site. You should also index the new sitemap.
G & 301s
For the 301 redirect, it is not a good idea to redirect all the links to the homepage (or any other page). Here is a guide from G about what to do (even you already have the .htaccess file, inside the backup downloaded few minutes ago, it's better to save a new copy again):

Extra notes:

*
When you login for the 1st time on the new domain, you should update the permalinks (Dashboard > Settings > Permalinks > Go down the page and press "Save changes".)

* If you encounter link issues (there is still the old link, instead of the new one), you should try this:
1. Identify the database name for the new installation. cPanel > Softaculous > Press the "pen" icon ("Edit Installation Details").
2. cPanel > phpMyAdmin > From the left meniu click on the database name (the one you identified above) > Press on the SQL button in the vertical menu > and paste the following code:

Code:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

3. Press "Go".
4. Clean your browser cache.

Cheers!
M
 
The simple way:
You can use any WordPress migration plugin (you name it) or Softaculous (built inside cPanel). Below are the steps for Softaculous:
  1. cPanel > Domains > Create new domain;
  2. Configure the nameservers;
  3. - Softaculous > Export old site > 3.1 - Import the backup to the new location;
  4. The redirection should be auto-configured through WordPress (media path, etc). If not, see the code below about how to change the urls in the db. You can also use a plugin for this task.
  5. WMT > Add new site. You should also index the new sitemap.
G & 301s
For the 301 redirect, it is not a good idea to redirect all the links to the homepage (or any other page). Here is a guide from G about what to do (even you already have the .htaccess file, inside the backup downloaded few minutes ago, it's better to save a new copy again):

Extra notes:

*
When you login for the 1st time on the new domain, you should update the permalinks (Dashboard > Settings > Permalinks > Go down the page and press "Save changes".)

* If you encounter link issues (there is still the old link, instead of the new one), you should try this:
1. Identify the database name for the new installation. cPanel > Softaculous > Press the "pen" icon ("Edit Installation Details").
2. cPanel > phpMyAdmin > From the left meniu click on the database name (the one you identified above) > Press on the SQL button in the vertical menu > and paste the following code:

Code:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

3. Press "Go".
4. Clean your browser cache.

Cheers!
M
Thank you so much for taking the time to write this! Really appreciate that
 
The simple way:
You can use any WordPress migration plugin (you name it) or Softaculous (built inside cPanel). Below are the steps for Softaculous:
  1. cPanel > Domains > Create new domain;
  2. Configure the nameservers;
  3. - Softaculous > Export old site > 3.1 - Import the backup to the new location;
  4. The redirection should be auto-configured through WordPress (media path, etc). If not, see the code below about how to change the urls in the db. You can also use a plugin for this task.
  5. WMT > Add new site. You should also index the new sitemap.
G & 301s
For the 301 redirect, it is not a good idea to redirect all the links to the homepage (or any other page). Here is a guide from G about what to do (even you already have the .htaccess file, inside the backup downloaded few minutes ago, it's better to save a new copy again):

Extra notes:

*
When you login for the 1st time on the new domain, you should update the permalinks (Dashboard > Settings > Permalinks > Go down the page and press "Save changes".)

* If you encounter link issues (there is still the old link, instead of the new one), you should try this:
1. Identify the database name for the new installation. cPanel > Softaculous > Press the "pen" icon ("Edit Installation Details").
2. cPanel > phpMyAdmin > From the left meniu click on the database name (the one you identified above) > Press on the SQL button in the vertical menu > and paste the following code:

Code:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

3. Press "Go".
4. Clean your browser cache.

Cheers!
M
Hey quick question, if I just redirect them all by using cloudflares bulk link redirect is that okay aswell?
 
go to youtube write how to changing sites domain many video show practically its will be help for you
 
I got it done by, backing up wp-content & database.

Opening new Cpanel under the new domain.

Installing Wordpress on new domain.

Deleting the wp-content it created and replacing it with the backup up file.

Deleting all tables in database and importing the backed up ones.

editing wp-config file and changing the user/pass/prefix as it should be

301 redirecting all ranked pages through cloudflare..

done :)
 
Back
Top