A lot of small websites run on WordPress without using much of it. A handful of pages, a contact form, and maybe a blog that hasn't been updated in years. But somebody still has to keep the core, the theme, and every plugin up to date so it doesn't get compromised.
Moving a site like that to static HTML gets rid of the upkeep, and with Surreal CMS your client can still edit it. Here's how I'd go about it.
Make sure it's a good fit
Brochure websites are perfect candidates: businesses, restaurants, churches, portfolios, and small organizations whose pages change a few times a month. Stores, membership sites, and anything visitors log in to need a database, so leave those where they are.
If you're on the fence, Most Websites Can Be Static makes the case in more detail.
Get the HTML out
There are two ways to do this.
You can export the existing site. A static export plugin such as Simply Static saves every page as an HTML file. You can also mirror the site from the command line.
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent https://example.com/
Or you can rebuild it. If the theme is dated or the markup is a mess, it's often faster to start with a clean HTML template and paste the content in. You'll end up with better code and a site that's easier to edit.
Clean it up
An exported WordPress page carries a lot of code that only worked while WordPress was running. Left in, it links to addresses that no longer exist, loads scripts that don't do anything, and makes every page slower and harder to edit. Remove:
-
The generator tag, emoji script, and
wp-json, RSD, and oEmbed links in the<head> - jQuery and plugin scripts you no longer use
- Comment forms, login links, and anything else that talked to WordPress
WordPress also writes the full address into every link, like https://example.com/about/.
Change those to /about/ so the site works on the new host before you move the domain. If you
used wget, links come out as about/index.html and some files end up with names
like style.css?ver=6.6.css, so tidy those up too.
Features that needed a server, like contact forms, search, and comments, won't work on a static site. Decide which ones you really need before you switch over.
Keep your URLs
WordPress usually serves pages at addresses like /about/. Save that page as
about/index.html and the address stays the same, along with your links and search rankings.
Most export tools do this for you.
If an address has to change, set up a redirect on your host. It's easy to forget about old links like
/?p=123, so check your analytics for the pages people actually visit.
Make it editable
Add cms-editable and an id to the parts your client should edit. Put the header and footer in
static includes so a change to the navigation updates every page. Use
repeatables for lists like staff or services.
If the site has a blog, Adding a Blog to a Static Website shows how to handle it without a database.
Let an agent help
If you use an AI coding agent, it can do most of this for you. Paste this in, change the address, and it will use our Surreal CMS skill to do the work.
Read https://www.surrealcms.com/skills/surreal-cms/SKILL.md and use it to help me move the WordPress site at https://example.com to static HTML that my client can edit in Surreal CMS.
1. Download every page, or use the export in this folder if there is one. Keep each page's URL, so /about/ becomes about/index.html.
2. Remove what WordPress left behind: the generator tag, the emoji script, the wp-json, RSD, and oEmbed links, and any scripts the pages no longer need.
3. Change links to https://example.com/about/ or about/index.html to /about/, and remove version query strings from file names.
4. List anything that needs a server, like forms, search, or comments. Ask me what to do with each one instead of guessing.
5. Save every file as UTF-8.
6. Make the content editable. Put the header and footer in includes, and use repeatables for lists like staff or services.
7. Run the skill's checker on every page and fix what it finds.
8. List the WordPress URLs that won't exist anymore, like feeds and category or tag archives, so I can decide whether to redirect them.
Look over the pages it gives you before you move on. You'll still upload the files and point your domain at the new host yourself.
Move it and switch over
Upload the files to your new host, connect it to Surreal CMS, and enable the pages your client should edit. If you're not sure where to put it, see Choosing a Host for a Static Website.
Open each page in the editor and test everything on the new host before you point your domain at it. Once DNS is updated and the site looks right, keep a backup of the WordPress files and database for a while, then cancel the old hosting.
Why it's worth the move
When you're done, the server just sends files. There's no PHP to run or database to query, so pages load faster and the site holds up better when traffic spikes. There's no core, theme, or plugin to keep patched, and no login page for bots to hammer. Hosting costs less, and some hosts are free. To back it up, you just copy a folder.
Your client can still edit every page, and since we host the CMS, there's nothing to keep up to date on your end either.
If you're moving a site and run into trouble, feel free to contact us for help.