Setting up a WordPress staging site in cPanel

A staging site is a copy of your production website where you can test plugin updates, theme changes, and major content overhauls before publishing them to live visitors. This article walks through three ways to set up staging on your ipxcore cPanel account, in increasing order of convenience and cost.

Why use staging

  • Catch plugin update conflicts before they take down your live site.
  • Test theme customizations safely.
  • Try out new features without disrupting visitors.
  • Train new team members in a sandboxed environment.
  • Roll back broken updates by simply not pushing the changes.

Method 1: Subdomain staging (manual, free)

Create a complete copy of your site at staging.yourdomain.com:

Step 1: Create the staging subdomain

  1. cPanel → Domains (or Subdomains).
  2. Create staging.yourdomain.com with document root public_html/staging.

Step 2: Copy files

From cPanel's File Manager:

  1. Navigate to public_html.
  2. Select all files and folders (Ctrl+A).
  3. Click Copy, set the destination to /public_html/staging/.

Or via SSH:

$ cp -a /home/USER/public_html/. /home/USER/public_html/staging/

Step 3: Copy the database

  1. cPanel → MySQL Databases → create USER_wpstaging database and a new user with full privileges.
  2. cPanel → phpMyAdmin → export your live database to a SQL file.
  3. Import that SQL file into USER_wpstaging.

Step 4: Update wp-config.php

Edit public_html/staging/wp-config.php and update the database credentials to point at USER_wpstaging. Also add this above /* That's all */:

define('WP_HOME', 'https://staging.yourdomain.com');
define('WP_SITEURL', 'https://staging.yourdomain.com');

Step 5: Update URLs in the database

WordPress stores absolute URLs throughout the database. Run a search-and-replace:

  1. Install the Better Search Replace plugin on staging.
  2. Search for https://yourdomain.com → Replace with https://staging.yourdomain.com.
  3. Run for real after a dry-run check.

Step 6: Block search engines on staging

Add to public_html/staging/.htaccess:

Header set X-Robots-Tag "noindex, nofollow"

And in WordPress admin: Settings → Reading → tick "Discourage search engines from indexing this site."

This method is fully manual but requires no plugins. About 30-45 minutes the first time; faster with practice.

Method 2: WP Staging plugin (free, automated)

The WP Staging plugin automates the above. Install on your live site, click Create new staging site, name it, click Start. Three minutes later you have a working clone at yourdomain.com/staging-name.

The free version creates clones but doesn't push changes back to production. The Pro version ($89/year) supports two-way sync.

Method 3: Softaculous staging (free, easiest)

If your WordPress was installed via Softaculous, it has built-in staging:

  1. cPanel → Softaculous.
  2. Find your WordPress install.
  3. Click the Create Staging icon.
  4. Confirm. Softaculous spins up a clone at yourdomain.com/staging.

Make changes, test, then click Push to Live to merge. Note: Push to Live overwrites the live database, which means any orders, comments, or content created on production during your staging work will be lost. Use carefully.

Workflow recommendations

  • Don't leave staging running indefinitely. Each staging site uses disk space and gets out of sync with live. Delete after use.
  • Don't test plugin authenticity on staging only. Some plugins behave differently when activated under different domains. Test on staging, then test on production immediately after pushing.
  • Always backup live before pushing staging changes. "I tested it on staging" is famous last words. Take a fresh backup before any production change. See our backups article.
  • Don't use staging for content updates. If you publish a post on staging then push, you'll overwrite anything published on production in the meantime. Staging is for code/plugin changes; content goes directly on production.

Common pitfalls

  • Staging visible in search results. robots.txt and noindex tags weren't set. Set them; submit the staging URL for removal in Google Search Console.
  • Database left after deletion. If you delete the staging directory but forget to drop the database, you're wasting database quota. Always check.
  • SSL warnings on staging. AutoSSL needs to issue a separate cert for the staging subdomain. Wait 30 minutes after creating the subdomain, or trigger AutoSSL manually.
  • Staging email goes out. If your staging site triggers transactional emails (order confirmations, password resets), real customers might receive them. Install a plugin like WP Mail Logging to redirect or capture emails on staging only.
  • WordPress, staging, development, cPanel, workflow
  • 0 A felhasználók hasznosnak találták ezt
Hasznosnak találta ezt a választ?

Kapcsolódó cikkek

Nameservers

The nameservers to use for our webhosting services are below: all1.dnsroundrobin.net...

Setting up Dynamic DNS in cPanel

cPanel includes a built-in Dynamic DNS feature that automatically keeps an A record pointed at a...

Setting up Cloudflare with cPanel: the right way

Cloudflare is a free CDN and DDoS-protection service that sits in front of your ipxcore cPanel...

Speeding up WordPress on cPanel hosting

A slow WordPress site costs you visitors, conversions, and search rankings — Google has...

How to migrate your website to ipxcore from another host

Migrating an existing website to ipxcore is a process we've helped thousands of customers...