Cyber Monday Bonus:
50% OFF on all new
Domain registrations
Grab One
  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.

This article can be used when you are developing an entirely different staging site from scratch with new themes/plugins and layouts and when you want to replace the content on the live site.

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

Replacing the live site with the staging area requires good knowledge of our WPX Control Panel.

A full overview of the hosting panel can be found 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.

Pro tip: Keep tabs with phpMyAdmin and File Manager open in your browser to minimize website downtime throughout the process.

To manage downtime smoothly, we recommend setting up an HTML maintenance page to inform regular visitors about the temporary unavailability and prevent confusion from potential error messages.

Step 3. Delete Live Site Database

To fully replace the content on the live site, start by deleting its existing database. Deleting the live site database will result in brief downtime until the content migration is complete using the Merge to Live function.

Start by going to Databases menu (1) and use the phpMyAdmin button (2) to enter the specific database of the live site you want to replace:

After logging into phpMyAdmin, you’ll see a list of all databases for your sites. Locate and select the specific database that your live site uses, then select all its tables.

Each time you deploy a staging instance, a similar database will appear with a name ending in “_staging” to differentiate it from the live site database.

For example, in the image below, we selected the live database named wpxexamp (1) and then clicked Check all (2) to select all tables.

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

After deleting all tables from the live site database, the next step is to delete all files except one wp-config.php. The Merge to Live function uses the file to merge the contents of your live and staging sites, so you need to have that one present.

Open the File Manager menu as shown below.

Remember, all your sites are stored within the “domains” directory, with each site having its own “public_html” (root) directory. The only exception is your main domain — in our case, wpxexample.net — which is located in a separate “public_html” directory, as shown in the image below.

Open the public_html folder of the live site you’re working with. Then select all files with one checkmark NAME (1) and de-select wp-config.php (2).

Be careful not to delete the wp-config.php file from the live website.

To delete the selected files, simply right-click on any of them and choose Delete from the menu.

Then a prompt with a final confirmation will appear on the screen. The screen will contain a list of the selected files to be deleted.

Look through the final list of files before confirming the deletion.
Make sure that wp-config.php is not on the list. Also, 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 the easy part is to Merge to Live. Go to Manage Websites (1) and select Merge To Live (2) to complete the process:

On the next pop-up click Yes to confirm the operation.

On the next window, remove the check from Make a personal backup of the Live Site first (there is no point in doing it, as you already deleted its content). And click on the Continue with Merging button.

You can close this notification and continue working with the control panel if needed. The process will be completed in the background and you’ll receive a notification once it is completed.

That’s it. Clear your browser cache and check your website in the browser. Make sure to set up a good caching plugin and enjoy your new site.

If you get stuck with anything discussed on this page, please get in touch with 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