How to Move a WordPress Staging Site to a Live Site
Bulletproof Backups for Your WordPress Website
Fortify your business continuity with foolproof WordPress backups. No data loss, no downtime — just secure, seamless operation.
A WordPress staging site is a proactive measure to reduce downtime and data loss. But, you have to push changes to the live site safely.
For new website admins, this can be a nightmare. But staging sites are supposed to avoid just that. They’re supposed to reduce the chances of a website crashing from an update or error.
The challenge is that pushing changes to the live site will overwrite everything. It’s like wiping a whiteboard clean and writing new information. The old notes are no longer visible. The old live site is no longer visible.
This is fine if it’s a static site but let’s say you manage a website for a hotel chain. After troubleshooting a plugin update, you push the changes to the live site. If you didn’t take any precautions, you will lose bookings that were made prior.
This article will walk you through different ways to push changes to the live site, smoothly.
TL;DR: While pushing changes to your live site comes with the risk of data loss, there is no way around it. We recommend that you take precautions like a complete backup with a backup plugin, before jumping the gun.
A crucial maintenance task is pushing changes from a staging site to a live site. But what exactly does that mean?
The method of pushing changes to the live site will vary depending on where your staging site is set up.
Let’s say, if your staging site is hosted on your computer, the process needs technical know-how. It involves exporting your staging site and importing it on your live one. In contrast, BlogVault offers a one-click Merge feature. In this article, we’ll cover the different methods and offer tips on how to make the transition smooth.
However, the first thing to do is take a backup of your live site. We recommend you use a reliable backup plugin like BlogVault. It should backup the entire site—files and database tables. BlogVault also offers a one-click restore that you can fall back on, in case you lose some data.
Option 1: Using a staging plugin (RECOMMENDED)
If you’ve used a staging plugin to create a staging site, it will offer its own way to push changes to the live site. For the sake of this article, we are going to talk about managing staging sites with BlogVault. BlogVault simplifies the entire process of pushing changes to your live site, in a one-click and beginner-friendly way.
Static sites
If your site is static, like a simple blog or portfolio site, the process is straightforward. After making your changes on the staging site, navigate to the BlogVault dashboard. Find the staging section and click Merge. This will automatically sync all your changes from the staging site to your live site.
Dynamic and WooCommerce sites
WooCommerce staging sites or those of dynamic sites, can be a bit trickier. This is because things are constantly changing. New orders, user registrations, and other interactions are happening regularly. Blindly pushing changes to your live WooCommerce site can result in orders being overwritten and lost.
This is why we recommend that you replicate the steps you made to your WooCommerce staging site on your live site. If, for example, you tested an Elementor update that was successful, you can now update the same plugin on the live site too.
However, it’s possible you still want to use the Merge option. Maybe you tested out a new site design that is too difficult to replicate. In that case, we recommend that you put the site in maintenance mode before you push changes to the live site. Enabling maintenance mode involves some downtime, making it less than ideal. But it significantly reduces the risk of losing orders.
Why is BlogVault the best way to manage a staging site?
- One-click staging: BlogVault provides an incredibly user-friendly experience with its one-click staging feature. You can create a staging site in seconds. There is no hassle of creating a new WordPress installation manually.
- One-click merge: The seamless one-click merge function helps you push changes from staging to live. This eliminates the complex and often risky manual steps.
- No impact on site performance: Your staging sites are stored on BlogVault’s servers. This means that your live site’s server resources are left untouched. This in turn means that your site speed isn’t affected.
- Automated backups: BlogVault automatically creates a backup of your live site daily. So, even if the merge fails, you have reliable, recent backups that you can fall back on.
Option 2: If the staging site is hosted on a different web host
It’s also possible that your staging site is hosted on a different web host from your live site. In that case, Migrate Guru is an excellent tool to help you migrate your site safely. It helps with a smooth transition, regardless of the differing hosting environments.
- Install Migrate Guru: First, install and activate the Migrate Guru plugin on the staging site that you want to clone. You can find it in the WordPress plugin repository and install it from your dashboard.
- Choose the destination web host: Once activated, go to the Migrate Guru tab in the WordPress dashboard on your staging site. You’ll then be prompted to choose the destination web host of your live site. Migrate Guru supports all major hosts out of the box. Note: Make sure WordPress is installed on your destination host.
- Initiate migration: With all the details entered, click Migrate. Migrate Guru will start copying your staging site to the live server. The plugin handles the entire process without any more human intervention.
- Verify migration: Once the migration process is complete, check your live site thoroughly. Check important pages, posts, and functionalities to confirm they are working as expected.
Note: Migrate Guru doesn’t support migrations from localhost. It also doesn’t currently support multisite networks.
Option 3: If the staging site is hosted by your web hosting provider
If you choose a good web host, it will offer built-in staging environments that get hosted on the same server. Each host has its own method for pushing changes from staging to live. For this article, we tested Cloudways and we’ll show you how to push changes efficiently on them. If you use a different web host, check their documentation.
Note: If you have a WooCommerce or dynamic site, we recommend that you put your site in maintenance mode. This is an essential step before you make any changes to the staging site. Then, just before you push changes to the live site, take a complete backup of the live site.
Cloudways
- Login to Cloudways.
- Find the staging application.
- Click Push in the Push changes from the staging site to the live site section.
Other web hosts like Kinsta also have their own documentation on how to push changes to the live site.
Option 4: If your staging site is hosted locally
When your staging site is hosted locally, you’ll need to migrate data from local to the live site This involves exporting files and the database from your local environment. After that, you have to import them to your live site.
This process is time-consuming, complicated, and sometimes risky. We’ve put together this step-by-step guide to reduce the risk of failure as far as possible:
- Create a zipped file of the site files: Navigate to the root directory of your local WordPress installation. Compress all the files and folders into a ZIP archive. Include everything inside the WordPress directory, such as wp-content, wp-includes, wp-admin, and other core files.
- Export the site database: Open your local database management tool (like phpMyAdmin).Select the database used by your local WordPress site.Click on the Export tab and choose the export method as Quick and format as SQL.Save the exported SQL file to your computer.
- Upload the zipped file to your host: Log in to your web hosting control panel and navigate to the file manager. You can also use an FTP client to connect to your live site.Upload the ZIP archive you created earlier and extract its contents.Replace the existing files on the live server.
- Upload the database: Open the database management tool provided by your web host.Select the database used by your live WordPress site. Click on the Import tab and choose the SQL file you exported from your local site.Import the file to replace the current database with the updated data.
- Connect the site and database to each other: Open the wp-config.php file in your live site’s root directory.Ensure the database name, username, password, and host settings are correct for your live server. It will look like the code below:
// ** MySQL settings – You can get this info from your web host **
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘mybhsite_WP1AX’);
/** MySQL database username */
define(‘DB_USER’, ‘mybhsite_WP1AX’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘password’);
/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);
Save the file and upload it back to the server.
- Fix URLs: If the local and live site URLs are different, you’ll need to update the site URLs in the database. Use a tool like phpMyAdmin to search and replace instances of the local URL with the live URL in the database.
- Clear the caches: Clear your browser cache and revisit your live site to ensure everything is functioning correctly.
- Last few tests: Test various pages, posts, plugins, and interactive elements to make sure they are working as expected.
As you can see, this is a very technical process. But, there are other tools like BlogVault that you can use to create a staging site. BlogVault reduces the need for any technical know-how.
Best practices around staging sites
Creating test sites and using them effectively can greatly enhance your website management and development processes. Here are some best practices to ensure your staging site is both secure and efficient:
- Keep backups of various versions: Always keep backups of different versions of your staging site. This allows you to revert to a previous version if something goes wrong during deployment.
- Limit access: Access to the staging site should be limited to developers and admins only. This reduces the risk of unauthorized changes and ensures that only qualified individuals are handling updates and tests.
- Password-protect the staging site: Adding a password to your staging site prevents unauthorized access. It also reduces the risk of a regular website user finding it, or Google from indexing it.
- Use HTTPS: If your production site uses HTTPS, make sure your staging site does too. This ensures consistency and helps you catch any HTTPS-related issues before going live.
- Sufficient resourcing: Ensure the staging environment is adequately resourced and reflects the production (live site) environment. This means having similar server configurations. You also need adequate memory, and processing power to ensure everything goes well.
- Document findings and outcomes: Keep detailed documentation of the findings and outcomes of your tests. This information is crucial when you’re replicating them on the live site.
- Separate hosting environments: Use separate hosting environments for your staging and live sites. This avoids resource conflicts and reduces the performance impact on your live site.
- Separate databases: Make sure your staging site uses a different database from your live site. This prevents any accidental overwriting of live data and maintains the integrity of both environments.
Final thoughts
Pushing changes to your live site is an important step in the website maintenance process. But it comes with significant risks. This action will overwrite your existing live site, potentially leading to data loss.
We recommend you always take a full backup of your live site before proceeding. This precaution ensures that you can restore your data if any is lost. A good backup plugin like BlogVault is the best precaution to take. It automatically takes daily backups and will help you restore your site in one click. The backups are reliable, fail-proof, and require no human intervention. Bonus: it has an integrated staging feature for your site.
FAQs
How to make a staging site live in WordPress?
Depending on where the staging site is hosted, the method will vary:
- If you used a staging plugin, they will have a feature to push to the live site.
- If your staging site is hosted elsewhere, use Migrate Guru.
- If your staging site is hosted locally, export the site and import it to the live one.
What is the best staging plugin?
When it comes to managing a WordPress staging environment, BlogVault stands out as the best staging plugin. Here’s why:
- You can create a staging site with just one click. This simplifies the process and saves time.
- After testing, you can merge the changes from your staging site to your live site with a single click.
- BlogVault automatically creates backups every day. So if the merge results in data loss, you can recover it.
- Staging sites are stored on BlogVault’s servers. This means that there are no performance issues on your live site during testing.
Why is a staging site important?
A staging site provides a risk-free space to test new features, updates, or designs. It prevents unexpected errors that could occur when changing the live site. Meanwhile, the live site can remain functional and professional at all times.
For developers and content managers, a staging site streamlines the workflow. It allows them to make and review changes before deploying them to the live environment. This approach ensures that the user experience on the live site is consistent.
What is the best way to manage a staging site?
Effective management of a staging site involves several best practices and tools:
- Always keep backups of various versions of your staging site.
- Restrict access to only developers, testers, and other authorized personnel.
- Password-protect the staging site to prevent unauthorized access.
- If your live site uses HTTPS, ensure your staging site does too.
- Make sure the staging environment accurately reflects the production environment.
- Keep detailed documentation of the findings and outcomes from your tests.
- Use separate hosting environments for staging and production to avoid resource conflicts.
- Ensure the staging site uses a different database from the live site.
- Conduct regular audits of your staging site practices and update them as necessary to stay current with best practices.
- Regularly monitor server and application logs for any signs of issues.
Tags:
Share it:
You may also like
Repair WordPress Installation In 6 Simple Ways
Is your WordPress site currently facing errors, running slower than usual, or even completely offline? If you’re struggling with the white screen of death, database connection errors, or malware warnings,…
How to Take a cPanel Backup
Every website admin knows that backing up your website is important. The worst case scenario is not being able to restore a crashed or hacked site. Good backups are like…
How Often To Backup A Site
In today’s digital age, safeguarding your data is more crucial than ever. There is also an abundance of advice on when to take website backups and how often to take…
How do you update and backup your website?
Creating Backup and Updating website can be time consuming and error-prone. BlogVault will save you hours everyday while providing you complete peace of mind.
Updating Everything Manually?
But it’s too time consuming, complicated and stops you from achieving your full potential. You don’t want to put your business at risk with inefficient management.
Backup Your WordPress Site
Install the plugin on your website, let it sync and you’re done. Get automated, scheduled backups for your critical site data, and make sure your website never experiences downtime again.