Skip to main content

How to Clone Your Application

Learn how to clone applications on Cloudways servers with ease. Step-by-step guide plus important notes on staging apps.

Written by Syed Abuzar Mehdi
Updated over 3 months ago

Cloning an app is effortless on the Cloudways Platform. This guide explains how you can clone applications on either the same server or another server.

You can do this to create different environments (dev, test, production) to integrate into your development workflow.

Typical cloning times may range from 20 minutes to several hours, depending on the application's size and complexity.

If you pair app cloning with our git deployment feature, you can build powerful and simple workflows.


Table of Contents:


Cloning Scope: Inclusions and Exclusions

When you clone an application on the Cloudways Platform, several components are duplicated to ensure a smooth replication process. Here's what gets copied:

Items

Description

Webfiles and Database

The cloned application includes all web files and its associated database, ensuring that your content and data are replicated accurately.

PHP Version and Settings

The cloned application inherits the same PHP version and settings as the live app, maintaining consistency in runtime environments.

WP Admin Credentials

WordPress Admin credentials are also copied over, allowing seamless access to the cloned application's backend.

However, there are certain elements that are not copied during the cloning process:

Items

Description

SSH Credentials and Users

SSH credentials and associated users are not duplicated. You'll need to set up SSH access separately for the cloned application.

Specific Directories

Certain directories are excluded from the cloning process to prevent unnecessary duplication and maintain integrity:

  • /.git/*: Git-related files and directories are not copied.

  • **/wp-content/cache/*: Cache directories within the WordPress wp-content folder are excluded.

  • **/wp-content/debug.log: Debug log files are not copied to the cloned application.

CDN Parameters

Content Delivery Network (CDN) parameters are not replicated during cloning. You may need to configure CDN settings for the cloned application separately.

Site and Home URL

The site and home URLs are not automatically updated during cloning. You'll need to adjust these settings manually after the cloning process is complete to ensure proper functionality.

By understanding what gets copied and what doesn't, you can effectively manage the cloning process and ensure that your applications are replicated accurately while retaining control over specific configurations and settings.

Factors such as the size of the application, server load, and DNS propagation time can significantly affect how long the cloning process takes.

Important:

Staging applications cannot be cloned either on the same server or across different servers.

When you clone a server, only the live applications are included in the cloning process. Staging applications are excluded, which may cause the cloned server to show fewer applications than expected.

This is normal behavior and does not indicate an incomplete cloning process.

How to Clone Your Application

Here are a few simple steps to clone your application. First of all, please select your platform:

Cloudways Flexible

Step #1 — Navigate to Your Application

Log in to your Cloudways Platform using your credentials.

  1. From the top menu bar, open Servers.

  2. Then, choose the server where your desired application is deployed.

  3. Next, click www.

  4. Choose your application.

Step #2 — Clone Your Application

  1. Open the Quick Actions menu and select Clone App/Create Staging.

    Here, you need to select your destination server where you want your application to be cloned. You can go with the same server, a different available server, or a new server, so choose your option from the drop-down and click Continue.

    Important:

    Please note that if you are cloning your application on a different server available in your Cloudways account, it must meet the minimum application requirements. You can also not choose a new Database provider (If you are using MariaDB, you cannot switch to MySQL 8.4, and vice versa)

    Tip:

    If you are trying to make a staging application (staging environment), Click Here to read a comprehensive guide about staging applications.

The application cloning process will start shortly, and the time will depend on the amount of data your web application contains. You will see a notification once the application will be cloned.

Troubleshooting Stuck Cloning Processes

If the cloning process is not making progress:

  1. Monitor the server cloning status on the Cloudways platform.

  2. Check for resource-intensive activities on the server.

  3. Contact Cloudways support for further assistance to resolve any system-related delays.

Monitoring Cloning Progress

You can track the cloning process directly from the Cloudways dashboard. If it seems prolonged, consider checking server resource usage or requesting assistance from Cloudways support.

For instance, small applications (less than 30GB) usually take 20–30 minutes to clone, medium-sized applications (30–100GB) may take up to an hour, and larger applications (over 100GB) might require several hours depending on server conditions.

If you see any warning highlighting the differences of packages on source and destination servers, then you may follow this guide to upgrade or install your server packages. We recommend checking and upgrading packages before to avoid any compatibility issues and then clone your application.

Important

If you use a custom session path and encounter errors while cloning your application or creating a staging application. In that case, we recommend updating the session path to /home/hostname/application_name/public_html/var/sessions, as this directory "var/sessions" is excluded by default from cloning and staging creation processes to avoid any conflicts. Click here to learn more about updating the session path.

Cloudways Autonomous

Step #1 — Navigate to Your Application

Log in to your Cloudways Platform using your email address and password.

  1. From the side menu bar, choose Cloudways Autonomous and select My Applications.

  2. Next, choose your desired application.

Step #2 — Clone Your Application

  1. Next, click the ⋮ More Options and select Clone Application.

  2. Here, you need to select the region for your destination application. You can go with the same region or a different region, so choose your region from the drop-down and click Clone Application.

    Tip:

    If you are trying to make a staging application (staging environment), Click Here to read a comprehensive guide about staging applications.

The application cloning process will start shortly, and the time will depend on the amount of data your web application contains. You will see a notification once the application will be cloned.

Troubleshooting Stuck Cloning Processes

If cloning seems stuck:

  1. Review the progress on the Cloudways dashboard.

  2. Analyze server performance metrics to identify resource bottlenecks.

  3. Seek help from Cloudways support for further assistance.

Monitoring Cloning Progress

Track cloning statuses via the Cloudways dashboard. If the cloning process appears stuck, inspect server activity or contact Cloudways support for assistance.

For example, small applications typically take under 30 minutes, medium-sized applications can take an hour, and very large applications (over 100GB) may require several hours, depending on the situation.

Note:

If you use a custom session path and encounter errors while cloning your application or creating a staging application.

In that case, we recommend updating the session path to /var/www/html/public_html/var/sessions, as this directory "var/sessions" is excluded by default from cloning and staging creation processes to avoid any conflicts.

Click here to learn more about updating the session path.

Post-Cloning Actions

Once the cloning process is complete:

  1. Verify that all applications and services function correctly in the new environment.

  2. Update DNS records if needed to expedite propagation.

  3. Monitor the cloned setup to ensure expected performance before deprecating the original server or application.


That’s it! We hope this article was helpful.

Need Help?

If you need assistance, feel free to:

We're here 24/7 to help you!

Did this answer your question?