Knowledge Base

How to stage a website with Softaculous and cPanel

This article describes how to use Softaculous and cPanel to stage a website.

About website staging

It is important to test a site's code and content before you publish it and make it available to the public. The easiest way to do this is by using a website staging environment. With just a few quick steps, Softaculous enables you to easily configure a testing environment for your site.

Setting up the staging environment

You can host the staging environment in your current webspace on cPanel by creating a new domain or subdomain. For example, if your primary domain is example.com, you could create a staging.example.com subdomain to use as the testing environment. Alternatively, you can use subdirectories for staging sites.

For information about how to create a subdomain in cPanel, please see this article.

Staging the site

The following procedure uses WordPress for the sample installation. A staging copy of the WordPress installation is created in a subdirectory named staging. To do this, follow these steps:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. In cPanel, click the Softaculous icon or link. The Softaculous Enduser Panel appears.
  3. In the upper right corner of the Enduser Panel, click the All Installations icon:

  4. Choose the installation that needs the staging site. If your installation is not visible in Softaculous, you can import it. Please see this article for details.
  5. Click the Create Staging icon for the selected installation. The Create Staging page appears with a form to complete the details of the staging site.
  6. Complete the staging installation details, such as Choose Domain, In Directory, Database Name, etc.
  7. Click Create Staging. The time taken varies in accordance with the size of your installation, so please be patient.

You can now use this staging installation to test updates, develop a new version of the site, or any other changes you may want to test.

Pushing a staged site to live

When you push a staged site live, Softaculous creates a backup of the existing live site first. To learn more about Softaculous backups, please see this article.

The following procedure uses WordPress for the sample installation:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. In cPanel, click the Softaculous icon or link. The Softaculous Enduser Panel appears.
  3. In the upper right corner of the Enduser Panel, click the All Installations icon:

  4. Choose the staging installation you want to push to live, and then click the Push To Live icon. The Push to live page appears.

  5. On the Push to Live page, choose Default Options or Customize:

    • Default Push: The Default Options tab is selected by default. This option replaces all of the files of your existing live installation with the files in the staging installation. Additionally, the existing live database is erased and the database from your staging installation is imported.
    • Custom Push: To create a custom push, click the Customize tab. On the Customize tab you can select to not overwrite files, and select which portions of the database you want to push. This option is useful when you are working with a sample database, or if portions of the live site have been also been updated at the same time as the staging site.

  6. After making any desired customizations, click Push to Live. The time taken varies in accordance with the size of your installation, so please be patient.