How to Create a Clone / Staging Site in WordPress
Updated last week
A staging site is a copy of your WordPress site where you can test changes before applying them to the public website. This guide uses WordPress Management in cPanel. Before cloning, make sure your plan has enough space for the files and database of the copy, and save a backup of the main site.
Open WordPress Management
First, log in to cPanel and select WordPress Management from the left side of the panel.
Clone Installation
Find the installation you want to clone and click Clone:
A window will open where you can specify the clone’s location. We recommend using a subdomain such as staging.domain.com or dev.domain.com. Make sure the destination and its database are different from those of the main site.
Protect access to the staging site
Enable password protection for the test environment and discourage search engines from indexing it. These are separate controls: asking search engines not to index the site does not make it private. Maintenance mode displays a notice to visitors and does not replace access protection either. If you can’t find these options, contact us before copying customer data.
Prevent emails, charges, and live integrations
Before testing, review the clone’s automations. Copying the site may also copy credentials and scheduled tasks connected to live services.
Google Analytics, Site Kit, or any analytics tool, to avoid contaminating the main site’s analytics.
Block outgoing emails from the clone or direct them to a test environment, and verify that it works. Disabling only the SMTP plugin does not guarantee that WordPress will stop sending messages through another method.
Use the payment gateways’ test mode. Review subscriptions, scheduled tasks, webhooks, and connections to inventory or billing systems to make sure the clone does not charge customers or modify live data.
Google or Facebook for WooCommerce, or any plugin that generates a feed, which won’t be needed on the test site
Copy settings to the main site
If you want to transfer the changes made on the staging site to the main site, you can use the “Copy Data” tool in WordPress Management:
Copying a staging database over production can overwrite orders, users, inventory, and other recent changes. The tool does not automatically merge new activity from both sites.
Before copying, make a current backup of production and check whether you need to transfer files, the entire database, or specific tables. If the store or classroom is still receiving activity, coordinate the change with support and your developer. Don’t choose tables based on guesswork: the data may be related.
After publishing, check access, forms, and checkout. Make sure production retains its live credentials, email delivery, and correct indexing settings; keep the staging site protected.