How to Clone Your Application

A comprehensive guide on how you can clone an application on a Cloudways server.

Cloudways Product avatar
Written by Cloudways Product
Updated yesterday

Table of Contents

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.

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

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.

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.

    Classic Interface

    New Interface

  3. Next, click www.

  4. Choose your application.

    Classic Interface

    New Interface

Step #2 — Clone Your Application

  1. In Classic Interface, hover over the Grid icon located at the bottom right corner of the screen and select Clone App/Create Staging.

  2. In New Interface, open the Quick Actions menu and select Clone App/Create Staging.

    Classic Interface

    New Interface

    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.

    Tip

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

    Classic Interface

    New Interface

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.

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.

Classic Interface

New Interface

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.

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 /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.

That’s it! We hope this tutorial was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.

Did this answer your question?