1. Home
  2. Hosting Tools
  3. Staging Area
  4. Can I replace the Live site with the Staging?

Can I replace the Live site with the Staging?

Yes, you can entirely replace the live site with the content built on the staging site.

You can use this article when you are developing an entirely different staging site from scratch with new theme/plugins and layout and if you want to replace the content on the live site.

Replacing the live site content with the staging entirely will cause downtime because it includes deleting the files and database of the live site.

Keep in mind that the method used to replace the live site with the staging area is recommended for advanced users ONLY and it requires good knowledge of our WPX Admin Panel.

Information regarding our WPX Admin Panel and what it has to offer can be read here.

Step 1. Log in to your WPX account

You can log in to your WPX account here.

Step 2. Navigate to your hosting plan

You can either find your hosting service through the navigation menu or within your dashboard. Once you log in to your WPX account select My Services (1) → WordPress Hosting (2).

Then you will see all of your hosting services with us. When you find the plan that you want to manage, you need to select the orange button Manage service.

An additional pro tip would be to prepare tabs on your browser with phpMyAdmin and File Manager opened so you can shorten the downtime on your website during the entire process.

Step 3. Delete Live Site Database

To completely replace the content on the Live Site, then you need to prepare by deleting its database.

Deleting the live site database will cause brief downtime until you complete the whole process of migrating the content by using our Merge To Live function.

To properly prepare for downtime, we would advise using an HTML Maintenance page to prepare your regular visitors who may see temporary errors.

You will need to first navigate through Databases (1) and use the phpMyAdmin button (2) to enter the specific database of the live site you want to replace:

Once you log in to the phpMyAdmin interface, you will see a list of all the databases of your sites. You will need to choose the specific database of the live site and select all the tables.

Every time you deploy a staging instance, a database with a similar name will appear. The only difference, as shown below, is that the name ends with “_staging

For example, we have chosen “wpxexamp” (1) which is the database of our live website, and selected Check all (2):

After you selected all the tables, you will need to use the drop-down menu to select (1) and choose Drop (2) from the options:

That will lead you to a confirmation page where you need to select to finish the process:

Step 4. Delete Live Site files

The next step after deleting all the tables from the live site database would be to delete all the files except one that would allow the Merge option to work properly.

You will need to navigate to the File Manager menu as shown below.

A reminder: all of your sites are located in the “domains” directory, and each one of them has an individual “public_html” (root) directory.
The only site that is not located in there is your main domain (in our case that is wpxexample.net. It’s located in а discrete directory “public_html” shown in the image below.

Once you’ve opened the File Manager, you need to navigate to the specific live site’s public_html folder which would contain the files:

Once you have listed all the files, you can select them with one checkmark NAME (1) and then de-select only one file that is needed wp-config.php (2) for the Merge function to work in the end.

Make sure NOT to delete the wp-config.php file from the live website. The file is needed for the Merge button to work which will perform the migration of the staging website to live.

You can then right-click on any of the selected files and determine the action you want to take, which would be Delete:

It will then ask you for final confirmation before proceeding to complete the task of deleting the selected files:

You need to be careful when completing the task and look through the final list of files before confirming the deletion. Only one file needs to be left out and that is the wp-config.php one. If you have an HTML Maintenance file, then be sure to leave it there as well. Deleting it would result in a WPX Error Page on your website.

Step 5. Merge the Live Site and Staging Site

Now that you have deleted the database of the live site, you can go ahead and use the merge option from your hosting panel by navigating to Manage Websites (1) and selecting Merge To Live (2) to complete the process:

Once the merge is completed, you will have completely replaced the live site content with that of the staging area.

If you have any other questions on the topic, don’t hesitate to contact the WPX Support Team via live chat (use the bottom right-hand widget) and they will respond and help within 30 seconds or less.

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support