How to Create a WordPress Staging Site

What is a Staging Site and Why Does It Matter?

A staging site is an exact replica of your live WordPress website running in a completely isolated environment. Its purpose is to let you test changes — updates, new features, code modifications — before they affect your real visitors.

Think of it like a test kitchen: you perfect the recipe before putting it on the menu for customers.

⚠️ Why staging matters: WordPress sites breaking due to conflicting plugin/theme updates is extremely common. A staging environment eliminates the risk of downtime for real users entirely.

Key Benefits of a Staging Site

When Should You Use a Staging Site?

Not every change requires staging, but the following scenarios should always be tested on staging first:

SituationRisk LevelRecommendation
Major WordPress core version updateHigh✅ Test on staging first
Updating multiple plugins at onceHigh✅ Test on staging first
Switching the main themeHigh✅ Test on staging first
Adding custom code / functions.php editsMedium✅ Recommended
Installing complex new pluginsMedium✅ Recommended
Editing text or imagesLowSafe to do on production
Publishing new postsLowSafe to do on production

Method 1: Manual Setup via DirectAdmin

This method is ideal for AsiaGB WordPress Hosting users with DirectAdmin. No extra plugin required.

Step 1: Create a Subdomain

DirectAdmin → Domain Management → Subdomain Management → create staging.yourdomain.com pointing to a new directory like public_html/staging.

Step 2: Copy WordPress Files

DirectAdmin → File Manager → select all files in public_html → copy to public_html/staging.

cp -r /home/username/domains/yourdomain.com/public_html/* \
      /home/username/domains/yourdomain.com/public_html/staging/

Step 3: Export and Import Database

DirectAdmin → MySQL Management → export existing database → create new database (e.g., username_staging) → import the exported data.

Step 4: Update wp-config.php

// Edit /staging/wp-config.php
define('DB_NAME', 'username_staging');
define('DB_USER', 'username_staging');
define('DB_PASSWORD', 'new_password');
define('DB_HOST', 'localhost');

Step 5: Update URLs in Database

Use phpMyAdmin or WP-CLI to replace the production URL with the staging URL:

UPDATE wp_options SET option_value = 'https://staging.yourdomain.com'
WHERE option_name IN ('siteurl', 'home');

Method 2: WP Staging Plugin

WP Staging is a popular plugin that creates a staging site in a few clicks — ideal for beginners.

Installation and Usage

  1. WordPress Dashboard → Plugins → Add New → search "WP Staging" → Install & Activate
  2. Go to WP Staging → Create new staging site
  3. Name the staging site (e.g., staging creates URL yourdomain.com/staging)
  4. Select tables to copy (select all is recommended)
  5. Click Start Cloning and wait for the process to complete

💡 WP Staging Free vs Pro: The free version is sufficient for general testing. Pro adds push-to-production and auto-scheduled backups.

Method 3: Duplicator Pro

Duplicator is widely used for both backups and staging. Available as free and paid.

Main Steps

  1. Install Duplicator → Packages → Create New
  2. Select "Clone/Staging" → configure your package
  3. Duplicator creates two files: archive.zip + installer.php
  4. Upload both to your staging subdomain/subfolder
  5. Run installer.php via browser to set up staging

Configuring Your Staging Site Properly

After creating staging, these settings are critical to prevent staging from affecting SEO and production:

1. Disable Search Engine Indexing

WordPress Dashboard (staging) → Settings → Reading → check "Discourage search engines from indexing this site"

2. Add noindex to robots.txt

User-agent: *
Disallow: /

3. Disable Outgoing Emails

Install "Disable Emails" plugin on staging to prevent sending real emails to users during testing.

4. Password Protect the Staging Site

DirectAdmin → Web Protection → Password Protect Directories → set a password for the staging subdomain to keep it private.

5. Disable Non-Essential Plugins

On staging, disable plugins that connect to external services such as payment gateways, CRM, and email marketing tools to prevent sending real data during testing.

Deploying from Staging to Production

Once you've verified everything works correctly on staging, here's how to push changes to production:

What to Deploy

⚠️ Warning: Never overwrite the entire production database with staging data if new content has been added to production after staging was created — you'll lose that content. Merge only schema changes instead.

Always Backup Before Deploying

AsiaGB Hosting provides twice-monthly automated backups (on the 1st and 15th of each month), but we recommend creating a manual backup via DirectAdmin or Duplicator before any major deployment.

Comparing Staging Methods

MethodEaseCostPush to ProductionBest For
DirectAdmin ManualMediumFreeManualExperienced users
WP Staging (Free)EasyFreeNot supportedBeginners, basic testing
WP Staging (Pro)Easy~$99/yr✅ SupportedDevelopment teams
Duplicator ProMedium~$69/yr✅ SupportedBackup + Staging
WP-CLI (advanced)HardFreeCustom scriptAdvanced developers

WordPress Staging Best Practices

Need WordPress Hosting That Supports Staging?

AsiaGB WordPress Hosting includes DirectAdmin, SSD storage, and 99% Uptime — fully compatible with staging subdomain setup.

View WordPress Hosting Plans →

Frequently Asked Questions

What is a WordPress staging site?
A staging site is an exact copy of your live WordPress website created in a separate environment for testing changes before they go live. It has its own database and files completely separate from production.
Do I need a special plugin to create a staging site?
No. You can create one manually through DirectAdmin without any plugin, or use plugins like WP Staging or Duplicator depending on your preference and technical level.
Will a staging site affect my SEO?
Not if configured correctly. You must set noindex on the staging site and block crawlers in robots.txt to prevent Google from indexing duplicate content.
How often should I sync staging with production?
Always sync before testing to ensure staging reflects the latest production state. Testing on an outdated staging environment can give misleading results.
Can I create a staging site with AsiaGB WordPress Hosting?
Yes. AsiaGB Hosting supports subdomain creation and DirectAdmin, making it easy to set up a staging environment at staging.yourdomain.com by cloning your files and database.