A staging site is a private copy of your live site where you can test plugin updates, a new theme or PHP version changes without visitors noticing. On MdmHost you can create one in a few minutes on a subdomain such as staging.example.com.
Before you start
- Enough free disk space for a second copy of the site (check cPanel → General Information → Disk Usage).
- A recent backup of the live site.
Option A: Softaculous staging
If WordPress was installed with Softaculous, it can create staging copies for you.
- Open cPanel → Software → Softaculous Apps Installer and click the Installations icon.
- Next to your WordPress install click the Create Staging icon.
- Choose the protocol and domain, enter
stagingas the directory or pick a subdomain, and set a new database name. - Click Create Staging and wait for the copy to finish.
- When you are ready, use Push to Live from the same Installations list, choosing whether to push files, database tables or both.
If the site was installed manually, use Softaculous → Import to register it first, or follow option B.
Option B: manual copy on a subdomain
- Create the subdomain in cPanel → Domains → Domains → Create A New Domain, for example
staging.example.comwith document rootstaging.example.com. - Copy the live files: in File Manager select everything in
public_html(except other sites' folders) and use Copy to the new folder, or compress and extract. - Create a new database and user in cPanel → Databases → Manage My Databases.
- Export the live database in phpMyAdmin and import it into the new database.
- Edit
wp-config.phpin the staging folder with the new database details. - Replace the URL in the staging database, for example with WP-CLI from the staging folder:
wp search-replace 'https://example.com' 'https://staging.example.com' --all-tablesKeep staging private
- In staging WordPress tick Settings → Reading → Discourage search engines from indexing this site.
- Add a password with cPanel → Files → Directory Privacy on the staging folder so neither visitors nor bots can see it.
- Disable outgoing email or set an SMTP plugin to log only, so staging does not send order or newsletter emails to real customers.
- Pause scheduled jobs from plugins such as backups to remote storage, so they do not overwrite live backups.
Test and deploy changes
- Make your changes on staging: update plugins, switch PHP version in Select PHP Version for the subdomain, or activate the new theme.
- Click through key pages, forms and checkout.
- Repeat the same changes on live, or push from Softaculous. Pushing the database overwrites live content, so avoid it on shops or busy blogs where new orders and comments arrive constantly.
Warning: Pushing a staging database to live replaces orders, users and comments created on the live site since the copy was made. For stores, push files only and redo settings by hand.
Troubleshooting
- Staging redirects to the live site: the URL search and replace was skipped, or
WP_HOME/WP_SITEURLconstants inwp-config.phpstill point to live. - No SSL on staging: run AutoSSL from cPanel → Security → SSL/TLS Status after the subdomain resolves.
- Login fails: clear cookies; both sites set cookies for similar domains.
