Moving a legacy site to static usually starts as a bet: change DNS, publish, then find out what broke. That is the wrong order. A static build can be made without publishing anything, and the result is a complete, browsable copy of the site as files. You can walk through it, click every link, read every asset and decide what belongs on the public side before a single visitor sees a change.
The preview is the argument. It shows what the site does and what needs to change before the migration, not after it.
Preview is not publish. Building and previewing does not touch DNS, the live host or the public site. The only thing that changes is the prepared copy on your machine or staging install.
Give yourself a safe copy first
Do not run the experiment on the production WordPress install. Take a copy to a local WordPress or a private staging site, then take a database backup anyway. Legacy sites often have plugins that behave unexpectedly during a crawl.
If you are choosing where that copy should live, compare the local options or read keeping WordPress private. The published site can be public while the editing site stays on your machine.
Build the preview
Run a build, then open the preview rather than publishing. The build report gives you the shape of the site: pages found, files prepared, links rewritten and anything that failed. The preview opens the prepared pages in a browser so you can use the site the way a visitor will.
Click through the navigation, a deep page, a post with images, a form and the 404. This is the point where you are still allowed to find problems. Nothing you do here reaches the live site.
Read the site as files
This is the part a live WordPress site hides from you. The build output is every page, stylesheet, script, font and image in one place. You can see the weight of a page instead of guessing from the editor. You can see that a page loads four copies of jQuery, two icon fonts and an image that should have been resized in 2019.
Use that inventory. The asset inventory guide walks through the build folder and the report. For a legacy site, the first pass is usually uncomfortable in a useful way.
- A plugin you retired still enqueues a script on every page.
- A page builder ships its full CSS to pages that use one block.
- Images are uploaded at 4000px and displayed at 600px.
- Three font families are loaded from two external services.
- A tracking script loads before the content and blocks it.
Questions to answer before migration
Go through the preview with the list below. Each row is a decision, not a bug report.
| What to check | What it tells you | What to do |
|---|---|---|
| Search | Whether it queries MySQL at request time | Build a Pagefind index, or keep search on a service |
| Forms | Whether they post to admin-ajax or PHP | Move to a form service or a small endpoint |
| Comments | Whether they write to the database | Turn them off or use a hosted service |
| Checkout and accounts | Whether anything needs a live session | Keep that part dynamic on a subdomain |
| Redirects | Whether old URLs only exist inside WordPress | Create host rules or static redirect pages |
| Embeds and maps | Whether third-party scripts still work | Replace with a link or a privacy-friendly embed |
| Media | What is oversized, unused or missing | Resize, remove and check the references |
| Admin and login | Whether they are reachable in the copy | Exclude them; the editing site stays private |
For plugin-specific answers, the compatibility table covers the common cases. Find the small number of features that need a live service and keep those, instead of keeping the whole database because one form needs PHP.
Choose the shape of the migration
There are three sensible shapes. The preview tells you which one you are in.
- Fully static. Content, search and forms all have a static or service answer. The live site is files and nothing else.
- Static with a dynamic island. The public site is files; the shop, members area or booking flow stays on WordPress or a small app at a subdomain.
- Static front, service back. The site is files and the interactive parts are hosted services: forms, comments, search, checkout.
None of these is a failure. A hybrid that keeps checkout working is better than a pure static site that loses the shop.
Fix, rebuild and compare
Make the changes in the WordPress copy, then build again. Remove the plugins nobody uses, replace the form, add the redirects, resize the worst images. Keep a note of what changed between builds so the second preview has a purpose.
This loop is where the migration gets small. A legacy site often looks impossible until the preview shows that only four pages need attention and the rest are already fine. The dead weight guide and the performance budget give the second pass a target.
Cut over when the preview is stable
The signal to publish is stability, not excitement. It is boredom: the preview loads, the links work, the form arrives, search returns the right pages and the 404 is useful.
Then publish to a staging host first, check it over HTTPS, and only then move DNS. Keep the old site available until the new one has been live long enough to trust. The migration runbook covers the cutover and rollback.
Before you touch DNS
- Every template and post type has been previewed
- Search and forms work in the preview
- Old URLs have a redirect or a real page
- The 404 page is useful
- Images and fonts are no longer embarrassing
- Someone else has clicked through it
- The old site can be restored quickly