.COM DomainHuge Price DropBuy at 1150 BDT Only
00
d
00
h
00
m
00
s
FlexoHost Logo
FlexoHost Logo
Back to guides
Wordpress3 min readApr 11, 2026

How to Create a WordPress Staging Site

Test changes safely by creating a staging environment for your WordPress site. What is a Staging Site? A staging site is a private copy of your live website where you can safely test changes, updates, and new features wi…

FlexoHost Team

Technical guides & hosting tips

On this page

Test changes safely by creating a staging environment for your WordPress site.

What is a Staging Site?

A staging site is a private copy of your live website where you can safely test changes, updates, and new features without affecting your visitors or breaking your live site.

Environment Purpose Visibility Database
Production Live site for visitors Public Live data
Staging Testing changes Private Copy of live
Development Building features Private Test data

Why Use a Staging Site?

Risk-Free Testing

Scenario Without Staging With Staging
Plugin update breaks site Visitors see errors Fix before going live
Theme change looks wrong Brand damage Test privately first
Code bug crashes site Revenue loss Catch in testing
Database corruption Data loss Protected live data

Common Use Cases

  • Test WordPress core, theme, and plugin updates
  • Preview design and layout changes
  • Debug issues without affecting visitors
  • Train team members on new features
  • Test WooCommerce checkout flows
  • Experiment with new plugins

Method 1: Hostnin WordPress Toolkit

The fastest way to create a staging site on Hostnin hosting:

Step-by-Step Instructions

  1. Log into your cPanel dashboard
  2. Navigate to WordPress Toolkit
  3. Find your website and click Clone
  4. Configure staging options:
Setting Recommended Value
Subdomain staging.yoursite.com
Database Create new (auto)
Files Copy all
  1. Click Start and wait for completion
  2. Access your staging site at the new URL

Automatic Features

  • Separate database created automatically
  • Search engines blocked by default
  • Easy push changes to live
  • One-click sync from production

Method 2: WP Staging Plugin

Free plugin method for any WordPress host:

Installation

# Via WP-CLI
wp plugin install wp-staging --activate

Or install via WordPress dashboard: Plugins → Add New → Search “WP Staging”

Creating Staging Site

  1. Go to WP Staging → Create New Staging Site
  2. Name your staging site (e.g., “staging”)
  3. Select files and database tables to clone
  4. Click Start Cloning
  5. Access via yoursite.com/staging

Plugin Comparison

Feature WP Staging Free WP Staging Pro Hostnin Toolkit
Create staging
Push to live
Scheduled backups
External database
Price Free ৳6,000/year Included

Method 3: Manual Staging Setup

For advanced users who need full control:

Step 1: Create Subdomain

In cPanel → Subdomains:

  • Subdomain: staging
  • Domain: yoursite.com
  • Document Root: /staging

Step 2: Copy Files

# Via SSH or File Manager
cp -r /public_html/* /staging/

Step 3: Create Database Copy

-- In phpMyAdmin
CREATE DATABASE staging_db;
-- Import production database backup

Step 4: Update wp-config.php

define('DB_NAME', 'staging_db');
define('DB_USER', 'staging_user');
define('DB_PASSWORD', 'secure_password');
define('WP_HOME', 'https://staging.yoursite.com');
define('WP_SITEURL', 'https://staging.yoursite.com');

Step 5: Update URLs in Database

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

UPDATE wp_posts SET post_content = REPLACE(post_content, 
'https://yoursite.com', 'https://staging.yoursite.com');

Protecting Your Staging Site

Block Search Engines

Add to staging robots.txt:

User-agent: *
Disallow: /

Password Protection (.htaccess)

AuthType Basic
AuthName "Staging Site"
AuthUserFile /home/user/.htpasswd
Require valid-user

WordPress Login Protection

Add to wp-config.php:

define('WP_ENVIRONMENT_TYPE', 'staging');

Best Practices

Practice Why It Matters
Sync regularly Keep staging current with production
Use separate database Prevent data conflicts
Block search engines Avoid duplicate content issues
Password protect Keep staging private
Test thoroughly Catch issues before going live
Document changes Track what was modified

Pushing Changes to Live

Hostnin Toolkit Method

  1. Make changes on staging
  2. Test thoroughly
  3. Click Push to Live in WordPress Toolkit
  4. Select what to push (files, database, or both)
  5. Review and confirm

Manual Push

  1. Backup live site first
  2. Export staging database
  3. Copy modified files to production
  4. Import database changes
  5. Clear all caches

Troubleshooting

Issue Solution
White screen after cloning Check wp-config.php database settings
Images not loading Update URLs in database
Login redirect loop Clear cookies, check site URLs
Mixed content warnings Update hardcoded URLs to HTTPS

Conclusion

A staging site is essential for professional WordPress development. Whether you use Hostnin’s built-in tools, a plugin, or manual setup, always test changes in staging before pushing to production.

Pro Tip: Set up a staging workflow: Development → Staging → Production. This ensures thorough testing and reduces the risk of breaking your live site.


Last updated: April 2026 | FlexoHost Technical Team

 

Written by

FlexoHost Team

Technical Writer

Need Help? We Are Here To Help You

Please feel free to consult with one of our experts, who will thoroughly evaluate your specific requirements and provide a tailored proposal that perfectly aligns with your company's unique needs and realities.