Skip to main content

Static Export (Beta)

Beta

Static Export is in beta. Read what Beta means before you rely on it.

Static Export makes a static copy of your WordPress site: plain HTML, CSS, JavaScript, images and other files that any static host can serve without WordPress, PHP or a database. You can publish the copy straight from WordPress to Cloudflare, or download it as a ZIP file and host it anywhere.

This page explains what Static Export does, whether your site fits, and where to start.

What it does​

Static Export visits every public page of your site the way an anonymous visitor would, saves what WordPress sends back, and rewrites the links so they work on the static host. The result is called an export: one complete set of files for one run.

  • Pages built with Etch and Oh My Etch are saved as they render at the moment you export. Dynamic data is filled in at that moment, so the static copy shows the content your site had when you exported it.
  • Oh My Etch components that run in the browser, such as accordions, tabs and dialogs, keep working, because the export includes the Oh My Etch front-end files.
  • Facet lists can keep their filters and pagination on the static site. A list recorded with Composed Filters keeps them however many filter combinations it has; a list recorded as Facet Snapshots keeps them within a limit. See What works on a static site.

What a static host cannot do is run code on a request. Anything that needs WordPress to answer a visitor does not work there: forms, search, comments, logins, shopping carts and checkouts.

When to use it​

Static Export suits sites whose pages are the same for every visitor: company and marketing sites, portfolios, landing pages, documentation, and catalogues with filtered lists.

The recommended way to work is to build the site in WordPress on your own computer, with WP Studio or LocalWP, and publish only the static copy. Your WordPress site then never has to be online.

Static Export is not a fit for a WooCommerce store, a membership site, or a site that depends on forms, search or comments.

Where to find it​

Static Export lives in the Oh My Etch panel inside the Etch builder:

  1. Open the Etch builder.
  2. Click the Oh My Etch Components button in the toolbar.
  3. Choose Static Export in the panel's navigation.

Only administrators see Static Export. More precisely, the feature needs a user who can manage the site's options, which in a standard WordPress site means the Administrator role.

Static Export is off until you switch it on. While it is off it adds nothing to your site except its own on/off setting. See Export a site.

Requirements​

  • WordPress 6.7 or newer. The Oh My Etch plugin runs on older versions, but Static Export refuses to start on them.
  • Pretty permalinks. In Settings → Permalinks, choose any structure other than Plain.
  • An administrator account.
  • For an export from the panel: a browser tab that stays open until the export and its filters are done, and a deployment too when you deploy from the panel.
  • For deploying from WordPress: a Cloudflare account. It connects with Connect with Cloudflare, where you sign in and approve, or with an API token. See Deploy to Cloudflare.

What is not supported​

  • Multisite networks. Static Export is not supported or tested on a network.
  • WooCommerce. Shop, cart, checkout and account pages, products and product categories and tags are left out of the export. See WooCommerce pages.
  • Custom domains from the plugin. The plugin publishes to Cloudflare's own address, https://<worker>.<your-subdomain>.workers.dev. To use your own domain, set it up in the Cloudflare dashboard.
  • Deploying to GitHub Pages. It is coming in a later version; the panel shows it as Coming soon. You can already host the ZIP file on GitHub Pages yourself: export with the matching site address and upload the unzipped files to a repository that has GitHub Pages switched on.
  • Anything that needs a server on each request: forms, site search, comments, logins and map filters. See What works on a static site. A Search facet on a facet list works where the list is recorded with Composed Filters; see Text search.

What Beta means​

Static Export can be used today, but parts of it may still change. In practice:

  • Its setting names, its admin requests, the layout of the files it stores on your server, and its WP-CLI commands, constants and filters may change between Oh My Etch releases. Oh My Etch normally promises full backward compatibility; Static Export is the one exception until the Beta label is removed.
  • After an update, check your WP-CLI scripts and wp-config.php settings against these pages.
  • Everything else in Oh My Etch keeps the full compatibility promise. Static Export does not change how your live site behaves.

How it fits together​

  1. Export the site and read the summary. Facet filters are recorded with it.
  2. Deploy to Cloudflare, or download the ZIP and host it yourself. Under Cloudflare, Deploy to Cloudflare does step 1 for you: it exports the site and deploys that export with one click.
  3. Keep your tokens safe.
  4. Automate it with WP-CLI, and use Troubleshooting when something is refused.