Key takeaways
- A staging site is a private copy for testing changes.
- Keep it password-protected and out of search engines.
- Never copy a staging database over a live shop without merging new orders.
Option 1: Use your installer
In cPanel, open your WordPress installer, find your installation and choose Create Staging. Pick a subdomain such as staging.example.com, then wait for the copy to finish.
Option 2: Do it manually
- Create a subdomain like
staging.example.comwith its own document root. - Copy the files from your live site’s folder into the subdomain folder.
- Export the live database and import it into a new, empty database.
- Update
wp-config.phpin the staging folder with the new database details. - Replace the URL in the staging database from
https://example.comtohttps://staging.example.comwith a search-replace tool or WP-CLI:
wp search-replace 'https://example.com' 'https://staging.example.com' --skip-columns=guid
Keep it private
- Password-protect the staging folder with Directory Privacy.
- In staging, tick Settings → Reading → Discourage search engines.
- Dashboard
- Posts
- Media
- Pages
- Appearance
- Plugins
- Users
- Tools
- Settings
- General
- Reading3
- Permalinks
Reading
Save ChangesPush changes live
For design and plugin changes, repeat them on live or use your installer’s Push to Live. For shops and membership sites, avoid overwriting the live database — new orders and users would be lost.
Frequently asked questions
Can my WordPress installer create staging for me?
Many installers, including Softaculous, have a Create Staging option that clones the site to a subdomain or folder automatically.
Should staging be indexed by Google?
No. Password-protect it and tick 'Discourage search engines' in Settings → Reading, so it never competes with your live site.