Build second website from copy of current site

Avatar
  • updated
  • Answered

I want to build a second website using a copy of my existing website. I have a second URL. I don't want to inactivate my current website. How can I copy my website to the new URL and where will this "live" while I work on it?

Pinned replies
Avatar
anonymous
  • Answer
  • Answered

Hi Wendy! If you are on an account that has Softaculous (which would be any of our shared hosting plans, though it is an optional purchase on our VPSs), the easiest way to set this up is going to be by creating a staging site with Softaculous. Before doing so, just make sure you've already pointed that second URL to our nameservers (this is done automatically if you purchased the domain through us) and added that second URL as an addon domain

This will create a complete duplicate of the site files and a new site database, but using this second URL. If you checked in File Manager, the two sites will be in entirely separate directories. 

If you do not have Softaculous, you can always manually copy the files to another directory. The difficult part would be the database-- you would need to make sure that you create a new database in cPanel, add a user to that database, export a copy of the original database, import that copy to the new staging site's database, update the wp-config.php file of your new site to match this second database, and finally do a find-replace on the new database to change the URL from the original site to the URL of the staging site, all while leaving the original database untouched.

As you can see, the Softaculous method is the much easier choice between the two! To be sfae, though, I'd still check the wp-config.php files of both sites when you are done to verify that the staging site is using its own database. This should happen automatically, but it's always good to double check. 

This is one of those things that is quite simple when you get the hang of it, but can be a bit much the first time, so make an extra database backup before starting and feel free to reach out to our 24/7 Technical Support team if you run into any issues in the process.

Avatar
anonymous
  • Answer
  • Answered

Hi Wendy! If you are on an account that has Softaculous (which would be any of our shared hosting plans, though it is an optional purchase on our VPSs), the easiest way to set this up is going to be by creating a staging site with Softaculous. Before doing so, just make sure you've already pointed that second URL to our nameservers (this is done automatically if you purchased the domain through us) and added that second URL as an addon domain

This will create a complete duplicate of the site files and a new site database, but using this second URL. If you checked in File Manager, the two sites will be in entirely separate directories. 

If you do not have Softaculous, you can always manually copy the files to another directory. The difficult part would be the database-- you would need to make sure that you create a new database in cPanel, add a user to that database, export a copy of the original database, import that copy to the new staging site's database, update the wp-config.php file of your new site to match this second database, and finally do a find-replace on the new database to change the URL from the original site to the URL of the staging site, all while leaving the original database untouched.

As you can see, the Softaculous method is the much easier choice between the two! To be sfae, though, I'd still check the wp-config.php files of both sites when you are done to verify that the staging site is using its own database. This should happen automatically, but it's always good to double check. 

This is one of those things that is quite simple when you get the hang of it, but can be a bit much the first time, so make an extra database backup before starting and feel free to reach out to our 24/7 Technical Support team if you run into any issues in the process.