Create a Dedicated Subdomain for WordPress Staging

This guide offers a step-by-step guide to create a dedicated Subdomain for WordPress Staging. We will briefly explore the importance of having a dedicated subdomain name for WordPress staging purposes.

Why Do I Need a Subdomain for Staging?

When configuring your staging version, the most important aspect is where, within the parameters of your account's filesystem, to create and run your staging version.

Keep in mind, that while the staging site is not your actual production WordPress site, it is still a WordPress site. You will want to use similar practices as if you were installing another production WordPress site as an Addon domain within the hosting account. 

We strongly discourage anyone from installing the Staging site to a subdirectory of the production site, as this could have unintended consequences. By installing the staging environment as a subdirectory of your Production WordPress site, the staging site files will be subjected to any web server directives applied by the Staging installation as well as also having the production installation's web directives applied. While this may not occur initially, any future changes made to either installation increases the opportunity for conflicting directives being applied and they can be hard to troubleshoot and thus, very frustrating, for the typical WordPress admin.

We want to avoid any risky code-collisions between production site and staging site. The reason for the staging site, is, after-all, to eliminate potential issues created by pushing untested changes directly to live production site.

For these reasons, we recommend going for a subdomain, and configuring the subdomain to reside below the web root of your filesystem. This will ensure no "cross-contamination" will occur between your production and staging sites' files.

Steps to Create a Dedicated Subdomain for WordPress Staging

To create a dedicated subdomain for WordPress staging, follow these steps:

  1. Login to your cPanel account
  2. Navigate to and click the "Subdomains" icon within the "Domains" section of cPanel
  3. Now add a Subdomain of your Production WordPress's domain name.
    (In this example, our production site uses, so we will configure a subdomain, to meet this recommendation)

    Configure a Dedicated Subdomain for WordPress Staging

  4. Ensure the document root is below /home/{youruser}/public_html directory, where {youruser} is your cPanel account username.
    (in this example, our document root is configured to /home/username/
  5. Click "Create" to create the subdomain in accordance with your configuration in the previous steps.
  6. Once you receive confirmation of successful subdomain creation, you are ready to setup your staging site to use it

You now know how to create a dedicated Subdomain for WordPress staging, as well as some reasons why this is a good step to take to avoid potential disruptive issues in the future.


  • subdomain, wordpress, wordpress staging, apache directives, web root, document root
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Features of Softaculous WordPress Manager

All Rad Web Hosting servers used in fulfilment of cPanel Hosting and WHM Reseller Hosting...

How to Access the WordPress Manager Dashboard

This article will provide a guide for accessing the WordPress Manager Dashboard. This feature is...

Create WordPress Staging-Site for Testing and Development

This article provides a step-by-step guide to create WordPress Staging Site for testing and...

Introduction to WordPress Manager

This article will provide an Introduction to WordPress Manager Dashboard and overview of features...