How to swap domain names hosted on the same server

997 views Asked by At

I have two different wordpress sites(Site A and Site B). I need to interchange the domain names of the two sites. That is, I want SiteB.com to point Site A and SiteA.com to point Site B.

Can you please give me direction on how to do this?

Do I need to take care of any domain related settings in cpanel?

Both the domains are hosted on the same server. They are hosted on shared IP hosting.

Thanks,

4

There are 4 answers

0
unbesiegbar On

You will need to change the IP address for each site thats all.

1
Mahesh Shukla On

If you have all details then change the name-server or contact to person who book your domain.

0
Kailash Aghera On

As you mentioned that both websites are hosting on same servers but you want to interchange the contents for both websites, I suggest you to perform the following steps:

  • First secure full backup of both accounts.. just for safety.
  • Create a backup directory under "site A" and move all contents to backup folder.
  • Create a database backup for "site A"
  • Now copy all the contents of "Site B" to "site A"
  • Create a new database under site A account and restore site B database under newly created database
  • Now update your site A's wp-config.php (which was migrated from site B) file to use new database.
  • You will also need to update you WordPress URL. Refer following URL to change your WordPress URL from Site B to Site A:

https://codex.wordpress.org/Changing_The_Site_URL

Now move all contents from Site B to other place and copy the contents of Site A (which you backed up earlier) to Site B. Create a new database in Site B and restore the backup which you take earlier. Update your wp-config.php file to use new database. Follow the link to update your WordPress blog/site URL.

0
Serversitters.com On

change sitea.com to sitea.out

change siteb.com to sitea.com

change sitea.out to siteb.com

Then update your wordpress to use the new domain names in the database.