With xCloud, you can easily create a staging environment to push and pull site data between staging and production sites. This lets you test plugins, themes, or any site changes in a new environment and apply them as necessary to your production sites without the risk of breaking them.
Follow the step-by-step guidelines to learn how to create a staging environment to pull and push data between staging and production sites in xCloud.
Step 1: Create A Staging Environment In xCloud #
Log in to your xCloud dashboard, select a server, and create a new site. You need to have a live/production site to create a staging environment. So, if you are creating a new site from the dashboard, make sure you are going live.
However, if you create a demo site with an xCloud-generated domain at the beginning, you can change it to production/live later by navigating to the ‘Domain’ โ ‘Staging’ โ ‘Go Live’ option.
Step 2: Deploy Staging #
Once you are done creating a live site, you can quickly create a staging environment from the drop-down found beside the site name or by clicking on the โDeploy Stagingโ button.
A confirmation window will appear with the message of how staging works in xCloud. You need to confirm by clicking on the โDeploy Stagingโ button, and it will be deployed in a while with a test domain.
Step 3: Pull And Push Site Data #
Once you are done creating a staging environment for your production site, it is time to pull and push site data between them. On your staging site page, go to the โStaging Managementโ tab from the left menu to find the pull and push data options. You will also find the deployment logs to know when your changes have been made.
Now, if you need to pull any production site changes to the staging, press the โPull Dataโ button. You will have two options to pull: Files and Database. Plus, you can choose to overwrite all files or keep the most recent updates since the last pull with the โIncrementalโ option.
You can also select to pull the full database or select tables to pull specific data. Once you are done selecting, hit the โPull Dataโ button.
Your data pull will initiate and will be completed in a few seconds. You can see the pull status and record in the โDeployment Logsโ.
You can also push data from the staging to the production site by clicking on the โPush Dataโ button. Like pulling, you will also be shown a popup with the option to push files and databases. You can choose to overwrite all files or keep the most recent updates since the last push with the โIncrementalโ option.
On the other hand, you can push the full database or select specific tables to push data from staging to live. However, xCloud highly recommends you take a backup of the production site before pushing the data from the staging environment to restore your production website to prevent any data loss if any accident or error occurs.
Once you select your preferred options, hit the โPush to Productionโ button. Your data push will initiate and will be completed in a few seconds. Once the push process starts, xCloud backs up your environments, the destination is overwritten, and the cache is cleared on the destination. You can see the push status with the option and push record in the โDeployment Logsโ.
NOTE: If you delete a production site then all staging sites attached to it will be removed as they become orphan. To keep the staging site you can clone them and create a new site separately.
This is how easily you can create a staging environment to pull and push site data in xCloud between your production site and staging.
Still stuck? Contact our support team for any of your queries.