WP Engine organizes WordPress sites into environments — each site can have up to three: production, staging, and development. Understanding which environment to build on, and how domains relate to servers, is critical to avoiding data loss and deployment confusion.
This article documents the correct workflow, common mistakes, and how to handle edge cases like preserving an old site during a rebuild.
Derived from a live incident with [1] where a staging-to-production push overwrote a newly built site because the developer had built directly on production.
A domain (e.g., finwellu.com) is an address — not the website itself. The website lives on a server at a physical location (e.g., WP Engine). The domain is configured in DNS (via Cloudflare) to point to the server's IP address.
nextlevel-prd1.wpenginepowered.com (production), nextlevel-stg.wpenginepowered.com (staging)Build on Staging → Push to Production → Set Primary Domain → Configure Redirects
finwellu.com) as primary in WP Engine. This triggers a URL rewrite across the database.www and any WP Engine internal URLs redirect to the primary domain to avoid duplicate content penalties from Google.Never build on production. If you build on production and then push staging → production, the push overwrites everything you built.
This is the most common source of environment confusion. There are two scenarios:
If the old site needs to remain publicly accessible while the new one is being built:
Using staging or development as a "holding area" for the old live site is fragile — it can be overwritten by a push at any time.
If the team just needs a copy to reference during the build (not publicly accessible):
This approach carries risk. An accidental push from dev → staging can still cause data loss. Backups mitigate but don't eliminate the problem.
When switching a domain to a restored or newly built site:
nextlevel-prd1.wpenginepowered.com)www.finwellu.com → finwellu.com, prd1.wpenginepowered.com → finwellu.comfinwellu.com/wp-admin (not any old domain)What happened: Developer (Jeff) built the new Finwell U site directly on the production environment, keeping the old "Financial Wellness Done Right" site on staging as a reference. When Karly pushed staging → production, the old site overwrote the new one.
Resolution:
- Mark restored production to the 7:53 PM WP Engine daily checkpoint backup
- Confirmed the restored site was the correct new build via the nextlevel-prd1 URL
- Switched finwellu.com to point to the restored production site
- Set redirects for www and internal WP Engine URLs
Follow-up actions:
- Karly to email Jeff re: build-on-production practice
- Mark to set finwellu.com as primary, fix SSL, confirm redirects
See also: [2]
| Situation | Correct Approach |
|---|---|
| Building a new site | Build on staging, push to production when ready |
| Old site must stay live during rebuild | New server for old site; build new site on existing server |
| Old site needed for reference only | Copy to dev environment; add site note; communicate to team |
| Domain not resolving after push | Check DNS A record in Cloudflare + domain registered in WP Engine |
| Duplicate content / Google indexing issue | Redirect all alternate URLs (www, WP Engine internal) to primary domain |
| Client can't log in after domain change | Direct them to newdomain.com/wp-admin — credentials unchanged |