In this KB
- How to create the Staging Application
- How to copy Data between Staging and Live Applications
- Important Notes
This KB article covers the functionality of the Staging application.
Cloudways Staging application can be set up in minimum time and allows you to test out various functionalities and options for your application in a protected environment that does not affect the Live application. In practical terms, the Staging application is an isolated clone of your application that provides an ideal location to test UX/UI and custom code changes and can be easily created in 1-Click. Once the staging environment is set up, you can push and pull changes to test the application.
Step 1: Create the Staging Application
You can create the staging application for any Live application through a simple process.
Log in to Cloudways Platform and click Applications from the top menu bar to see the list of all installed applications.
Click the extended menu of the application for which you wish to create the Staging application. Select the “Clone App/Create Staging” option to create the Staging application.
Alternatively, you can create the Staging application from the Application Management menu. Click the circular grid icon and select “Clone App/Create Staging” to set up the Staging application.
Once you have clicked Clone App/Create Staging, a message will prompt you to choose a server. Pick the Same Server if you want to set up the Staging application on the same server. Otherwise, select your server from the list, and remember to click the “Create As Staging” checkbox, so that you can use all the functionalities of the Staging application without any issues.
Next, click the “Submit” button to finalize your choices.
Once the Staging application has been created, you can identify it in the Applications list with the “Staging” tag at the end of the name.
Step 2: Copy Data Between Staging and Live Applications
For the purpose of this article, all data copy operations will be conducted from the Staging application. However, you also have the option to Push or Pull data from the Live application as well.
Once the Staging application is up and running, you will see the following Staging Management option.
Data Copy Operations for the Staging Application
The Push option will copy the changes on the Live application with the data on the Staging application, which means that any updated files in Staging Application will be updated on Live Application after a push, but any deleted files in Staging Application will not be deleted in Live Application.
Note: You also have the option to back up the data of the Live application, which will be backed up before moving Staging changes to the Live application. We suggest you take backup in case you are pushing Database to the Live Application.
The Pull option will create a copy of changes from the Live application to the Staging application.
The Deployment Logs allows you to easily view the history of the Push and Pull actions. Just click the View Logs button to see the complete history.
- When to Use Staging and Clone
- While both Staging and Clone features appear to be similar, the use cases and application scenarios for both features are very different.
- Use Cloning if you need a copy of your Live application to a new (new, existing and same server) environment, and take that application live after applying the modifications/changes.
- Use Staging application if you need to create workflows focused on application development and testing. A Staging application offers an isolated environment that allows you to push and pull changes between Live and Staging applications without impacting the Live application.
- Password Protection for Staging
- By default, Staging application is password-protected. You can easily change the credentials or remove the password protection from the Access Details submenu option of the Staging Application.
- Rollback Changes on Live Applications
- If you have pushed changes from the Staging application to the Live application, you can still revert the changes by using the ROLLBACK option available in Staging Management Section of Live application. This only works if a backup of the Live application was taken before the Push operation. You also have the option to delete the backup of the Live application using the Delete option in the Live application.
- Deleting the Staging Application
- You can easily delete Staging applications by clicking the circular grid icon located in the Staging application and selecting “Delete App” option.
- CDN for Staging Application
- Even when the Live application has the CDN installed and active, the Staging application will not offer CDN option as Staging application only works as testing purpose where direct domain would be enough for the testing domain.
- Primary and Additional Domain Search and Replace
- Search and Replace will only be performed between Staging and Live Application, only for the Primary domain. If you have additional domain mapped, you will need to manually add them for Staging and then perform Search and Replace
- Impact of the Staging Application on the Server Management Features
- Cloning the Server: Consider the case when you clone the server that hosts both the Live and the Staging applications. If you use clone server functionality, the Staging application(s) which is tagged with staging on the source server will not be replicated on the cloned server.
- Transfer Server: Transfer server follows the standard procedure, as mentioned in this KB article. However, the following conditions will apply when you are transferring a server with Staging application.
- When both Live and Staging applications are hosted on the same server, the new owner will have access to both applications.
- When the server hosting the Live application is transferred, the new owner will not have access to the Staging applications located on the different server.
- When the server hosting the Staging application is transferred, the new owner will not have access to the Live application and the mapping between the Live and the Staging applications will be removed.
- Team Member Access to Staging Application
- A team member requires access to both Live and Staging applications in order to make use of Staging feature.
- Live Application Has Been Deleted
- If you delete the Live application, the linked Staging application is not automatically removed. You have to manually delete those applications.
- SSL on Staging Applications
- Multiple Staging
- You can create as many Staging applications you need for a single Live application. All these Staging applications will be isolated from each other.