pagehaus blog

Move your site off WordPress without losing your Google rankings

· guides, seo

Plenty of WordPress sites are really a handful of pages and a blog that changes a few times a year. They still need updates every week, plugins that break each other, and a hosting bill sized for a database. If that's your site, it can be plain HTML instead: faster, safer, and with nothing left to update.

The worry that keeps most people on WordPress is search traffic. Pages that rank in Google took years to get there. The good news is that rankings follow addresses and content, not the software behind them. Keep the same pages at the same addresses, send the ones that change to their new home, and Google carries on as before.

Here's how, step by step.

1. List the addresses you have now

Before changing anything, write down every address your site has, so you can check each one afterwards.

  • Your sitemap. WordPress makes one at yoursite.com/wp-sitemap.xml. If you use Yoast or Rank Math, it's at yoursite.com/sitemap_index.xml. Open it and save the list of pages and posts.
  • Google Search Console, if you have it: Indexing → Pages lists the addresses Google knows about, and Performance shows which of them bring visitors. Those are the ones that matter most.

Keep the list in a spreadsheet. You'll tick addresses off as you go.

2. Turn the site into plain HTML

There are two good ways, depending on how much you want to change.

Keep the site as it looks today. A plugin such as Simply Static saves your whole WordPress site as plain HTML files: every page, post and image, with your theme's design. Install it, run an export and download the ZIP. Because each page is saved at its own address (a post at /2019/05/my-post/ becomes 2019/05/my-post/index.html), most of your addresses stay exactly the same, and they won't need any redirects at all.

Start fresh with a simpler design. Use one of our free templates, or ask Claude or ChatGPT to rebuild your pages from your old content. Your posts can move into the Pagehaus blog, which writes them in Markdown and publishes them as plain HTML. This is a cleaner site to look after, but more addresses will change, so step 4 matters more.

Either way, look through the result for the parts of WordPress that ran on the server, because they won't work as plain files:

  • Contact forms (Contact Form 7, WPForms and the like). Point the form at /_form/contact with method="post" and Pagehaus emails you the messages, no plugin needed. See contact forms.
  • Comments. The comments already on your posts are saved as part of each page, but visitors can't add new ones.
  • Search boxes and logins. Remove them, or link the search box to a search engine.

3. Upload it to Pagehaus

Create a site, open its Files tab and use Upload .zip: the folders come out as they were in the ZIP. Check that index.html is at the top of your site, not inside a folder; if it isn't, the ZIP had everything in one folder, and you can move the files up or zip the folder's contents instead. Your site is live straight away at yoursite.pagehaus.site, so you can click through everything while your old site is still running at your domain.

Go down your list of addresses and open each one on the new site. Most should just work.

If you'd rather work on your own computer, the pagehaus tool can do the checking for you: pagehaus check finds broken links and missing images across the whole site before you upload.

4. Redirect the addresses that changed

For every address that's different on the new site, add a redirect, so old links and search results land on the right page. Create a file named _redirects at the top of your site, one rule per line:

/about-us/                /about.html
/contact-us/              /contact.html
/:year/:month/:slug/      /blog/:slug/
/category/recipes/        /blog/tags/recipes/
/feed/                    /blog/feed.xml
  • Each rule is a 301, which tells Google the page has moved for good, so its ranking moves with it.
  • Names like :year and :slug match one part of an address each, so one line can move a whole blog: the third line sends /2019/05/my-post/ to /blog/my-post/, where the Pagehaus blog keeps it. (Kept your WordPress addresses with Simply Static? Then you don't need it.)
  • A * at the end of an address matches everything after it, for moving a whole folder: /old-shop/* /shop/:splat.
  • A rule only applies where no page exists, so it can never hide a page you have.

Two WordPress addresses to know about: old links like yoursite.com/?p=123 (WordPress's "plain" permalinks) can't be redirected, because the page is in the query string. If your site used them, it's worth rewriting the links you can. And wp-admin, wp-login.php and the like don't need redirects; nobody should be looking for them.

All the details are on the redirects help page.

5. Move your domain

When the new site is right, connect your domain. Custom domains are on the Personal and Pro plans.

  1. Open your site's Domains tab and add your domain, both example.com and www.example.com if you use both.
  2. Pagehaus shows the DNS records to add. Add them where your domain is registered, replacing the ones that point to your WordPress host.
  3. HTTPS is set up for you as soon as the records are in place. Make one of the two addresses the primary one, and the other redirects to it.

DNS changes can take a few hours to reach everyone, so keep your WordPress hosting running for a few days after the switch. Then cancel it.

Your domain stays the same, so there's nothing to tell Google: you don't need Search Console's Change of address tool, which is only for moving to a different domain.

6. Watch for a few weeks

  • Your site's Analytics tab lists Broken links: addresses visitors followed that don't exist. Next to each, Redirect this address… adds the redirect for you. This catches the addresses that weren't in your sitemap.
  • Search Console will show a few "not found" addresses at first, as Google rechecks the old ones. If they're redirected, they clear up on their own.
  • It's normal for rankings to wobble for a week or two while Google rechecks your pages. If the addresses work and the content is the same, they settle back.

What you end up with

A site made of plain files that loads fast, can't be hacked through a plugin, and doesn't need updating. Your blog keeps its RSS feed, your forms still reach you, and every old link still goes somewhere.

Moving a site and stuck on a step? Write to support@pagehaus.app or ask on r/pagehaus, and we'll help with the redirects.

— Ademar