What works on a static site
Static Export is in beta. See what Beta means.
A static host serves files and nothing else. This page lists what keeps working after an export, what works within a limit, and what is left out, so you can check your site before you publish it.
At a glance
| Feature | On the static site |
|---|---|
| Pages built with Etch and Oh My Etch | Work. Saved as they rendered when you exported. |
| Dynamic data | Shows the values from the moment of the export. |
| Oh My Etch components that run in the browser (accordion, tabs, dialog, carousel and others) | Work. |
| Facet lists with checkbox, radio, select or searchable select filters | Work. Lists recorded as Facet Snapshots only as far as one export can hold them. |
| Facet pagination, load more, infinite scroll and reset | Work. |
| Free-text search facet | Works on a list recorded with Composed Filters, see Text search. Otherwise hidden; the rest of the list still works. |
| Map facet, address and distance filters | Hidden. The rest of the list still works. |
| Forms, site search, comments | Shown, but do not work. Reported in the summary. |
| WooCommerce shop, cart, checkout, account and product pages | Left out. |
| Content only logged-in users see | Not exported. Pages are fetched as an anonymous visitor. |
Pages and dynamic data
Every page is saved as WordPress rendered it during the export. Etch dynamic data, loops and Oh My Etch components are filled in at that moment, so the static copy does not change when your content changes. Export and deploy again after each change.
Facets: filters and lists
A static host cannot answer filter requests. So after each export from the panel, with Export site or Deploy to Cloudflare, the panel records the lists by running the real filters in your browser tab, and stores what it recorded with the export. On the static site the filters use those recordings instead of asking a server. There are two ways a list is recorded, Composed Filters and Facet Snapshots; the panel picks one per list by itself.
A list whose filters are not recorded shows only its first page on the static site, with its filter controls hidden.
Choose what is recorded
Right above Export site, and above Deploy to Cloudflare under Cloudflare, the panel offers Filters with three choices. The choice applies when you click that button; changing it records nothing by itself, and it cannot be changed while an export, a recording or a deployment runs. The panel keeps it until you reload the page, and starts with All filters.
| Choice | What the static site gets | Time |
|---|---|---|
| All filters | Every list with its filters and its pagination. A list recorded as Facet Snapshots that is too large for one export keeps its pagination only, see Lists too large for one export. | Grows with the number of items and filter options of a list recorded with Composed Filters, and with the number of filter combinations of a list recorded as Facet Snapshots: each combination is one request to your site. |
| Pagination only | Every list with its pagination; the filter controls are hidden. | Only the result pages of each list are recorded. |
| None | Nothing is recorded. Every list shows its first page, with its filter controls hidden. | Fastest: the export is done once its pages are. |
With None, the result of the export shows Filters None, and Deploy to Cloudflare deploys straight after the export. After a reload the panel no longer knows which choice an export was made with, so an export made with None may then say its filters were not recorded.
When the last export found no facet lists, the panel does not offer the choice.
Which controls can be recorded
| Control | On the static site |
|---|---|
| Checkbox list facet | Recorded. |
| Radio list facet | Recorded. |
| Select facet, single or multiple selection | Recorded. |
| Search select facet (a select you can type into to find an option) | Recorded. |
| Pagination facet, load more facet, load more on scroll | Recorded with the list's results. |
| Reset facet | Works when the list's filters are recorded. |
| Search facet (free text) | Works on a list recorded with Composed Filters, see Text search. Otherwise hidden. |
| Map facet | Hidden. No map is shown. |
| Map address facet and map radius facet | Hidden. |
| Other inputs bound to a list, such as date, number or range inputs | Hidden. |
A control that cannot work statically is hidden on the exported page; the result of the export then says, for example, Search and map filters are left out on 2 lists. A list whose text search was recorded is not counted there. The list it belongs to keeps working with its other filters and its pagination. For example, on a page with a map beside a filtered list, the map is hidden and the list still filters.
Composed Filters and Facet Snapshots
With All filters, each list is first tried with Composed Filters. The panel records which items each single filter option matches, the item order for each sort state, and the markup of each item once. Together this is the list's Composed Dataset. On the static site, the filters combine it in the visitor's browser. Recording time and size follow the number of items and options, not the number of combinations, so a list with many filters can keep them.
Every list recorded with Composed Filters is checked during the export: a sample of filter, sort and page states is answered both from the Composed Dataset and by WordPress, and the answers are compared. If anything differs, or the list is of a kind Composed Filters do not cover, the list is recorded as Facet Snapshots instead: one recorded result per filter combination, within the limits below. Nothing needs configuring. A Composed Dataset becomes part of the export only once its check has passed, so the ZIP and a deployment never hold one that was not checked.
Items with the same sort value, for example posts published at the same moment, have no fixed order in WordPress, and the live site can show them in a different order from one filter to the next. The static site keeps them in the one order recorded for the list.
Lists that are recorded as Facet Snapshots include, for example:
- A list beside a map.
- Every list on a site with WPML or Polylang.
- A list whose loop has an offset, a random order or an order by search relevance.
- A list with more than 10,000 items.
- A list that contains a private, draft, scheduled or password-protected item.
- A list with a multiple-choice control that compares a meta field with anything other than
IN. - A list whose loop is not a posts query.
- A list shown by two targets on one page.
A Composed Dataset is public on the static site, like every other file of the export. It holds the items an anonymous visitor can already get from the site's filters, the markup of each item, and which items match which option. It holds no post ids. A list with a private, draft or password-protected item is not composed, so such items are never included. When the list's text search is recorded, the dataset also holds a search file; see What the search file publishes.
Pagination only and None do not use Composed Filters.
Text search
A Search facet (free text) works on the static site when its list is recorded with Composed Filters and the panel could serve every text input of that list. The panel checks the search during the export, with sample searches answered both in the browser and by WordPress. If anything differs, or one of the list's text inputs is of a kind listed below as not served, all text inputs of that list stay hidden and the rest of the list still works. On a list recorded as Facet Snapshots, text inputs are always hidden.
What a Search facet can search on the static site:
| Search facet setting | What it finds |
|---|---|
Default query argument search (WordPress search) | Words in the title and in the excerpt written by hand, with WordPress's rules for quoted phrases, excluded words (-word) and common words. When the list has no sort order of its own, title matches come first, as on the live site. A post without a hand-written excerpt is found by its title only. |
Default query argument title_like | Text contained in the title. |
Default query argument name_like | Text contained in the slug. |
Default query argument category_name_like or tag_like, or a Taxonomy Argument by name or slug | Text contained in the name or slug of the item's terms of one taxonomy, parent terms included. |
Default query argument author_name_like | Text contained in the author's display name. |
Meta Argument with compare LIKE and type CHAR (or no type) | Text contained in the values of that one custom field. |
Query Bundle (several fields at once, AND or OR) | Works when every row of the bundle is one of the above. |
Any other text input, such as one bound to a post id, a date or a meta compare other than LIKE, is not served, and the list's text inputs stay hidden.
The list's text inputs also stay hidden when:
- A text input's field holds no text the panel can take a sample search from, or a text input's sample search was never tried during the check. A list with more than eight text inputs can hit this.
- Your site limits WordPress search to other fields than the title and the excerpt.
- Adding a search would change another part of the list's query, for example a theme snippet that changes the query when
is_search()is true, or a category, tag or author restriction of the list that the search would replace. - A text input searches author names and an author of the list has a display name equal to their login, nicename or email address. Set a proper display name for that author in Users.
- A text input searches slugs and a plugin changes how WordPress builds slugs (it filters
sanitize_title). - A text input searches the terms of a taxonomy that is not publicly viewable.
The console line of the list says which; see Reading the Composed Filters console line.
Where the static site differs from the live site:
- Post content is never searched. A post that the live site finds only through its content is not found.
- Upper and lower case and accents are compared by one simple rule in the visitor's browser, so a few letters may match differently than in your site's database. Accents are ignored only on Latin, Greek and Cyrillic letters; marks of other scripts must match. A no-break space counts as a plain space.
- The static site searches the text of the title, the excerpt and the searched fields with HTML tags and shortcodes removed. The live site matches the stored markup, so a search for text inside a tag or a shortcode can differ.
- Authors are matched by display name only.
- A search in term names is not limited to the first 100 matching terms, as it is on the live site.
- A few searches are not answered rather than answered differently: text containing
<in any of the "text contained in" searches above, and a slug search containing a letter whose slug depends on the site's language, such asä,ö,ü,ß,æ,ø,åorđ.
What the search file publishes
The search file is public on the static site, like the rest of the export. For each item of the list, by its position and without a post id, it holds the title and the hand-written excerpt, and only when a text input of the list searches them: the slug, the names and slugs of its terms in one taxonomy, the author's display name, or the values of one custom field. It never holds post content or user logins, and only items an anonymous visitor can already read. When an author's display name equals their login, nicename or email address, the author search is switched off for the list instead of publishing it. A custom field that WordPress treats as protected, such as one whose name starts with _, is never published; a list searching one gets no text search.
How many combinations
These limits apply to lists recorded as Facet Snapshots. Each combination of filter values is one recorded result, and the number grows fast:
- A filter where you pick one option (radio list, single select) has its options plus one combinations, the extra one being "nothing chosen".
- A filter where you pick any number of options (checkbox list, multiple select) doubles the combinations with each option: 10 options make 1,024 combinations.
- The filters of one list multiply. A 10-option checkbox list beside a 5-option radio list needs 1,024 × 6 = 6,144 combinations.
- Lists with pagination also record each result page of each combination. Those are counted while recording.
One export can hold at most 20,000 recorded results and 300 MB. Composed Datasets count toward the 300 MB too. A developer can change these with filters; see Filters.
Lists too large for one export
This applies only to lists that are not recorded with Composed Filters. With All filters, every such list with up to 500 combinations is recorded with all its filters. A list over that per-list limit is recorded with all its filters too, as long as the export can hold them: the panel adds such lists smallest first while everything recorded stays within what one export can hold. A list that does not fit keeps its pagination only: on the static site its filter controls are hidden and its pages work. The result of the export then says so in one sentence, for example 1 list has too many filter combinations for one export, so only its pagination is recorded.
The per-list limit of 500 no longer leaves a list without its filters by itself; only what one export can hold does. A developer can change the per-list limit with the ome_static_export_facet_snapshot_budget filter.
To bring a list within what one export can hold, show fewer options in its largest pick-any filter, then export again.
Lists built from the same template share one setting on the static site: when one of them gets pagination only, they all do. They work only when every one of them was recorded completely. A list recorded with Composed Filters keeps its filters either way.
While the filters are recorded
The panel shows Recording filters with a progress bar and one line, for example 2 of 3 lists · 305 of 110,592 filter combinations · 46 s: the lists done, the combinations of the lists being recorded now as Facet Snapshots, and the time elapsed. A list recorded with Composed Filters moves only the list count and the progress bar. Before and after recording itself, the line names the step instead. Keep the tab open until it finishes. Browsers slow down background tabs; when you switch away, the panel says recording barely moves. Closing the tab stops recording.
Cancel recording stops the run. Step 2 of ZIP file, Download, offers the download again once recording has ended.
When filters are not recorded
The result of the export shows Filters with, for example, 4 lists, Pagination only for an export recorded with that choice, None, or 3 of 4 lists when some could not be recorded. When something needs you, it shows Filters not recorded with the reason. To record again, click Export site, or Deploy to Cloudflare under Cloudflare: it exports again and records the filters by itself. Deploy to Cloudflare deploys nothing when recording is cancelled, stops or fails; when only some lists could not be recorded, it still deploys.
| Reason the panel gives | What to do |
|---|---|
| Recording was cancelled. | Click Export site or Deploy to Cloudflare. |
| The page could not be loaded. | Check the page works for visitors, then record again. |
| The filters on the page did not start in time. | Record again. |
| The page did not load completely while recording. | Check that the page and its scripts load for visitors, then record again. |
| The filters on the page could not find this list. | Check the facet controls point at the right list in Etch. |
| Some filter combinations could not be recorded. | Record again. |
| It has more result pages than can be recorded. | Show more items per page so the list has fewer result pages. |
| It shares its results with a list that could not be recorded. | Fix the other list sharing its template, then record again. |
| Its filters could not be switched on. | Record again. |
Recording also stops early when the export is full, when you are no longer signed in, or when the site stops answering. The panel says which. See Troubleshooting.
Recorded filters belong to one export. Every new export records them again by itself. While a deployment runs, the panel does not export or record; click Export site once it has finished.
An export made with WP-CLI does not record filters, because recording runs in a browser. Its lists show their first page, with the filters hidden. The panel then shows Filters not recorded; export there with Export site or Deploy to Cloudflare to record them.
For how facets work on a live site, see the Facets overview.
Forms, search and comments
These are exported and look as they do on your site, but there is no WordPress behind the static copy to receive what a visitor sends. The summary lists the pages under Works differently on a static host:
- Forms that send their data to this WordPress site with the POST method.
- Search forms, including WordPress's own search. A Search facet on a facet list is different and can work, see Text search.
- Comment forms.
Replace these on the pages you publish, or accept that they do not work there.
WooCommerce pages
WooCommerce needs a live store, so Static Export leaves it out:
- By address: the shop, cart, checkout and account pages that WooCommerce is set up with, single products, and product category and tag archives.
- By content: any other page (except the front page) that WooCommerce marks as one of its pages, or that contains a WooCommerce Cart or Checkout block or the Oh My Etch checkout form.
These pages appear under Left out of the export, and their links are not followed.
Pages that only show a WooCommerce widget, such as a mini cart in the header, an add-to-cart button or an Oh My Etch cart, are kept. They are listed under Works differently on a static host with Pages with WooCommerce features that need a live store, because the widget does not work there. Such pages change on every render, so each deployment uploads them again.
The front page is always exported.
For the WooCommerce components themselves, see Woo Components.