WordPress / 4 MIN READ
Staging Site to Final Site Migration
How to migrate a WordPress staging site to a live production site
From the original Fervor library. Examples may use older package versions.
🔁 WordPress Staging → Production Migration
(Liquid Web + Cloudflare + Email-Safe Method)
This guide covers how to move a live staging WordPress site into a final production domain without breaking:
- the site
- DNS
- SEO
- or your sanity
🧠 Core Principle (Read This First)
You never “test Cloudflare.” You test the origin server and the DNS records, then you flip traffic to Cloudflare in one clean motion.
Cloudflare does not have a preview mode — DNS correctness is the test.
PHASE 1 — Prep the WordPress Site (MOST IMPORTANT)
1️⃣ Lock the site URL inside WordPress
In the WP admin (or via database):
Settings → General
WordPress Address (URL): https://finaldomain.com
Site Address (URL): https://finaldomain.com
⚠️ If the site goes down after this:
- Add to
wp-config.phptemporarily:
define('WP_HOME','https://finaldomain.com');
define('WP_SITEURL','https://finaldomain.com');
This always brings it back.
2️⃣ Clean references to the staging domain
Use All-in-One WP Migration, Better Search Replace, or WP-CLI to replace:
staging.domain.com → finaldomain.com
Things this fixes:
- hidden URLs
- serialized data
- Elementor / Beaver Builder layouts
- redirects
- media links
👉 Your big DB output showing tables touched = good sign, not a problem.
3️⃣ Verify redirects inside WordPress
If you use a redirect plugin:
- Let it update references
- Confirm no redirect loops
- Confirm
www ↔ non-wwwbehavior is intentional
PHASE 2 — Liquid Web / cPanel Setup (Origin Server)
4️⃣ Domains in cPanel
In Domains:
-
Add
finaldomain.com -
Confirm it points to:
/home/username/public_html -
Do not add
wwwseparately if it auto-redirects (that’s normal)
5️⃣ Primary Domain (Important, but not urgent)
You do not have to change the primary domain immediately.
Safe rule:
- Leave primary as
brandithosting.comuntil after launch - Change primary later only if you want email or branding cleanup
PHASE 3 — Cloudflare Setup (Before Go-Live)
6️⃣ DNS structure (THIS is the clean setup)
Website records
A @ → Liquid Web IP (Proxied)
CNAME www → finaldomain.com (Proxied)
Why:
- One canonical IP
- Easy future IP changes
- Cloudflare-recommended
7️⃣ Mail records (DO NOT PROXY)
Mail stays DNS Only:
MX → *.mail.protection.outlook.com
CNAME selector1._domainkey → onmicrosoft.com
CNAME selector2._domainkey → onmicrosoft.com
TXT SPF
TXT DMARC
✅ What you confirmed is absolutely Microsoft 365
- Outlook MX
- onmicrosoft.com DKIM
- spf.protection.outlook.com
- DMARC quarantine
That alignment = 💯
8️⃣ Autodiscover — Should you add it?
Yes if:
- They use Outlook desktop
- Microsoft recommends it
Use ONE of these (not both):
Preferred
CNAME
autodiscover → autodiscover.outlook.com
Remove:
- old A records
- duplicate autodiscover entries
Never proxy autodiscover.
PHASE 4 — “Hard Testing” Before Launch
9️⃣ Test the origin directly (no Cloudflare)
Use:
/etc/hosts
Point:
finaldomain.com → Liquid Web IP
This confirms:
- WordPress URLs are correct
- SSL works
- No redirect loops
- Media loads
When this works → you’re safe.
🔟 Understand Cloudflare IPs (this is key)
If you see IPs like:
104.21.x.x
172.67.x.x
That means: ✅ You are already hitting Cloudflare ❌ You are NOT seeing the origin IP
This is expected behavior.
You never point DNS to Cloudflare IPs yourself.
PHASE 5 — Go Live (Registrar Flip)
1️⃣1️⃣ Update nameservers at registrar
Point to:
keira.ns.cloudflare.com
logan.ns.cloudflare.com
That’s it. No DNS edits at the registrar.
PHASE 6 — Post-Launch Checklist (5 Minutes)
- [ ] Site loads at root
- [ ] Site loads at
www - [ ] Correct redirect behavior
- [ ] Cloudflare SSL = Full (Strict)
- [ ] Email sends & receives
- [ ] No mixed content warnings
- [ ] No redirect loops
🧠 Key Lessons You Learned (The Gold)
- Cloudflare has no preview mode
- Seeing Cloudflare IPs is correct
- Mail DNS should never be proxied
- WordPress URL changes can always be recovered via
wp-config.php wwwas CNAME is cleaner than A- Autodiscover duplicates cause pain
- Email confirmation should be done before launch
If you want, next we can:
- Turn this into a printable checklist
- Make a “when it breaks” recovery section
- Convert this into a client-safe SOP
- Or tailor it for WooCommerce-heavy sites
This is solid, battle-tested ops knowledge now — you earned it.