Migrating an existing site is mostly bookkeeping. The build is the simplest part. The work is knowing what the site depends on, choosing where WordPress will live, and keeping old URLs alive when the PHP that answered them is gone.
Do it in stages. A first build, a comparison, a redirect pass and a DNS cutover are four changes. Mixing them into one long day is how a migration becomes an outage.
1. Inventory before you touch anything
Content
Count posts, pages, custom post types, categories, tags, authors and media. Note which post types are public. Check for content that only exists in a page builder’s tables, and for shortcodes that render on the front end. Export a WXR file as a second copy.
Plugins and theme
List every plugin and version with wp plugin list. Mark each one: content, presentation, infrastructure or integration. The integrations decide whether the site can be static at all.
- Forms need the Forms add-on or an external service.
- Search needs the Pagefind add-on or an external search service.
- Comments need a hosted service or they stop working.
- Ecommerce, memberships and bookings need a different architecture, not a static copy.
- Personalisation, A/B testing and geo-targeting run server-side and cannot be copied.
- Analytics and cookie banners usually work if they are client-side; verify the consent flow.
For the theme, note page builders, custom fields, fonts, icon sets and scripts that run after load. A builder’s markup often survives; its editor does not, and its scripts may load assets the crawler cannot see.
URLs and redirects
Get a URL list from the sitemap, analytics or wp staticscope detect. Count them. Look for uppercase paths, query strings, trailing slash inconsistencies and URLs that already redirect. Export the rules from your redirect plugin; they run in PHP and will not exist on the static host until you recreate them.
SEO and traffic
Note the canonical host, whether HTTP redirects to HTTPS, the top pages by traffic and the pages with the most backlinks. Those are the URLs you check first after cutover. If the domain changes, plan a change of address in Search Console; if not, still watch the sitemap and the 404s.
2. Decide where the editing WordPress lives
The questions are who edits, who publishes, and whether publishing must happen while your laptop is closed. A solo editor can keep WordPress in Studio or Local. A team, or a site with scheduled posts and client previews, needs a private host that stays up.
- Local-only is simplest and safest, but builds and schedules stop when the machine sleeps.
- A private staging host costs money and gives you availability, a shared address and a place for the crawler to run.
- Docker is for a team that already works that way, or a host with unusual extensions.
The editing site does not have to be the old live server. Move WordPress to a private host, point DNS at the static site and keep the old server for rollback. Do not point the editing site’s WordPress address at the public domain; it keeps its private address, and the static site owns the public one.
3. Freeze content and take a backup
- Announce a content freeze for the migration window. A build is a snapshot; edits during the build may or may not make it, and comparing URLs becomes noisy.
- Back up the database, uploads, plugins and themes, and
wp-config.php. Store the backup somewhere other than the server. - Test the restore on a spare site. A backup you have never restored is a guess.
- Export a WXR file, and record the exact plugin versions you started with.
- If staging exists, rehearse the build there. The first build of a migration is not the place to find a plugin conflict.
4. Build a copy
- Install StaticScope and the publishing add-on on the editing site.
- Set permalinks to Post name so the structure ends in a slash. Plain permalinks are not supported.
- Set Published site address to the final public URL, including
https://and any subfolder. Change the defaulthttps://example.com. - Decide what to copy. Start with the defaults: posts, pages, custom post types, archives and the files pages use. Turn on Every upload or Every theme and plugin file only if needed.
- Build a preview and keep the tab open. On a large site the crawl and preparation take minutes.
- Read the report: missing references, links back to WordPress, the placeholder address, unused files and search warnings.
- Open Preview files and find the heaviest pages and the files loaded everywhere. Fix the source in WordPress where you can, then build again.
Repeat until the preview looks right. Every rebuild changes nothing public, which is the point of separating a build from a publish.
5. Compare the old site and the copy
Pages and content
Diff the old sitemap against the new one. For the top pages, compare title, H1, canonical, meta description, Open Graph image and the main content. A side-by-side browser is enough. Check the pages visitors land on as well as the home page.
Assets and status codes
Open the preview’s badge. It reports files loaded from WordPress and files that are missing. Those are the two failures that make a static site look broken. Then check old URLs with curl -I: each should return 200 or the redirect you intended. Request a nonsense URL and confirm 404.html appears.
What a build cannot test
- Form submissions, including the success and error states.
- Search, if you use Pagefind, on a page that is not the one you tested.
- Comments, if you kept them through a hosted service.
- Checkout, login, memberships and anything that needs a session.
- Embeds: maps, video, social posts, consent banners.
- Mobile layouts and the menu, which may depend on JavaScript.
Also view source on a page and search for the WordPress host. The build report’s leak check does the same test, but your eyes catch issues a scan does not.
6. Redirects
StaticScope follows redirects while crawling and records the ones it stops on. It does not write _redirects, nginx rules or meta refresh pages. Your redirect plugin’s rules do not run on the static host. Recreate the permanent ones where the host can read them.
- Netlify and Cloudflare Pages read a
_redirectsfile at the top of the published site. The GitHub add-on keeps that file across publishes. - Your own server needs nginx or Apache rules, plus a 404 handler.
- S3 needs CloudFront Functions or the CDN in front of the bucket.
- GitHub Pages has no server-side redirects. Keep the old path as a real page, put Cloudflare in front, or use a meta refresh as a last resort.
Use 301 for a permanent move and 302 for something temporary. Decide the trailing slash policy and redirect the other form. Test with curl -I: status and Location should be right, and the target should return 200. Never redirect to the editing site.
7. Cut over DNS
- Lower the TTL on the DNS records 24 to 48 hours before. Note the current TTL so you can put it back.
- Publish and test on the host’s temporary address before DNS moves. A failure before cutover is a nuisance; after it is an outage.
- Set the published site address to the final domain and rebuild. Absolute links are baked in; changing DNS without rebuilding leaves old-host links in every page.
- Switch DNS: an apex A or ALIAS record, or a CNAME, as the host requires. Keep the old server running.
- Watch the certificate being issued, the
wwwand apex variants, redirect chains and the analytics property. - Submit the new sitemap and keep the old one until it 404s.
If HSTS is already on, a host with a bad certificate is worse than a slow site: visitors cannot click through. Check TLS before you move DNS, not after.
Do not change DNS and the build on the same day. The build, the host and the DNS move are three separate changes. If they happen at once, you will not know which one broke.
8. Keep a way back
Keep the old host, files and database untouched for a couple of weeks. Rollback is then a DNS change back, as fast as your TTL. If the static site is fine but the build is wrong, publish the last good ZIP or rebuild; no DNS change is needed.
Decide in advance what triggers a rollback: a broken checkout, forms that do not submit, missing pages or a search visibility collapse. Write it down. A promise to roll back later is not a trigger.
After a week of stable traffic, remove the old site only when you have a tested backup and the static site has been through a content cycle. Until then, the old server is cheap insurance.