Contents
The idea is simple: don’t experiment on the site your customers use. A plugin update or a PHP version change can trigger a critical error, and it’s far better for you to see it than every visitor.
The three environments
| Environment | Purpose | Who sees it |
|---|---|---|
| Development | Writing code, often on your computer | The developer |
| Staging | Testing a copy that matches the real server | The team and the client |
| Production | The live site | Every visitor |
Practical example: staging for a WordPress site
- Create a subdomain such as
staging.example.com(see how to create a subdomain). - Copy the site files into the subdomain’s folder, create a new database and import a copy of the original one.
- Edit
wp-config.phpin the copy so it uses the new database. - Change the site URLs to the subdomain. With SSH you can use WP-CLI:
wp search-replace 'https://example.com' 'https://staging.example.com' --skip-columns=guid
Don’t do a plain text replace in the SQL file: WordPress stores some settings as serialized data, which breaks when string lengths change. Without SSH, use a reputable migration plugin that handles serialization.
- Block indexing: tick “Discourage search engines from indexing this site”, or better, password-protect the folder.
Common problems
- Staging shows up in Google: indexing was left on and duplicate pages appear. robots.txt alone isn’t enough; a password is safer.
- Lost orders: pushing a whole staging database over a live WooCommerce store wipes orders placed since the copy was made. Push only files and changed settings.
- Real emails sent: a staging copy can email real customers. Disable outgoing mail on it.
On ArabyHost
WordPress installs in one click, and you create the subdomain and database in cPanel, opened from the Araby Panel. Before pushing anything from staging to the live site, remember that daily JetBackup backups let you roll back. On AI/Developer plans you can also test changes on a separate Git branch and deploy from GitHub.
FAQ
Does a small site need a staging environment?
Not for every small edit, but it pays off before big changes such as a new theme, a PHP version switch or a WooCommerce update. At the very least, take a backup before any update.
Can a staging site hurt my SEO?
Not if it is kept out of search engines. If it gets indexed, duplicate pages may compete with your real site, so protect it with a password.
What's the difference between staging and a backup?
A backup lets you go back to an earlier state; staging is a live, working copy where you try new changes before publishing them.