Cloning a web application can be useful for various purposes. For example, you can create a started template of your web application to quickly spin up new applications just by cloning them.

This is useful when you have a web application that has a common set of features and functionalities that you use frequently. By cloning, you can customize it for different projects or clients all while saving time and effort in setting up the web application from scratch.

For instance, if you’ve fine-tuned your Nginx configuration for optimal performance or set up specific ModSecurity rules for enhanced security, these settings will now be carried over to the cloned site. This saves significant time and reduces the potential for errors that could occur when manually re-configuring these elements.

On the other hand, you can create a duplicate copy of your website just for testing purposes. For example, if you want to test some changes or updates on your website without affecting the live version, you can clone it and test it on a different server or domain. This way, you can ensure that your website is working properly before deploying it to the public.

Note: If you want to create a clone of your WordPress website for testing purposes, we recommend using RunCloud’s WordPress staging feature.

Here are step by step instructions for cloning a web application.

  1. Log in to your RunCloud dashboard and select the web application that you want to clone.
  2. On the left sidebar, click on Cloning. This will open a new page where you can configure the cloning options.
  3. Choose the destination server where you want to clone your web application. You can select the same server or a different one. If you choose a different server, make sure it is connected to RunCloud and has enough resources to host your web application.
RunCloud clone dashboard

Note: If you have changed the default SSH port on your server, then you will need to specify the new port number of the destination server in the provided field to clone the web application successfully.

  1. Enter the name of the cloned web application and chose whether you want to create a new web application owner or use one of the existing ones.
  2. Next, you can specify the new username, password, and the database name for cloning the database. If you have hard-coded the database credentials in your web application, then you will need to manually edit the cloned application to use these new credentials.
Clone database on RunCloud
  1. Optionally, you can remove linked database before you start the cloning operation to avoid cloning it. This is particularly useful in scenarios where you might want to create a staging site with a fresh database, or when you need to clone a site but leave out connected database for privacy or data management reasons.

Note: If you un-link the database from your web application, then your site would continue to work as expected; however, the database will not be included in the backups. Therefore, it is recommended to re-link the database to your web application after you’re done.

  1. Finally, specify the domain name that you want to use for this application. If you are just using this app for testing purposes then you can use the test domain provided by RunCloud.
  2. Additionally, you can click on the Advanced options and check the boxes to clone custom Nginx configurations, and RunCloud Hub settings. This ensures that when cloning a WordPress site, all the crucial elements that contribute to its functionality and security are accurately reproduced.
Configure domain name of cloned application on RunCloud
  1. Click on Clone Webapp to Server. This will start the cloning process and you will see a progress bar on the screen. You will also receive a notification when the cloning is completed.
  2. Once the cloning is done, you can access your cloned web application by using the domain name that you entered.