# OhMyEtch Static Export (Beta) > Complete guide to exporting an Etch and Oh My Etch site to static files and deploying it to GitHub Pages or Cloudflare. This file contains all documentation content in a single document following the llmstxt.org standard. ## Static Export (Beta) # Static Export (Beta) :::caution Beta Static Export is in beta. Read [what Beta means](#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-works.mdx#facets-filters-and-lists). 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](./local-sites.mdx), 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](./export-a-site.mdx#turn-static-export-on). ## 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](./deploy-cloudflare.mdx). ## 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](./what-works.mdx#woocommerce-pages). - **Custom domains from the plugin.** The plugin publishes to Cloudflare's own address, `https://..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](./export-a-site.mdx#choose-the-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](./what-works.mdx). A Search facet on a facet list works where the list is recorded with Composed Filters; see [Text search](./what-works.mdx#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](./export-a-site.mdx) and read the summary. Facet filters are recorded with it. 2. Deploy to [Cloudflare](./deploy-cloudflare.mdx), or [download the ZIP](./export-a-site.mdx#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](./keeping-tokens-safe.mdx). 4. Automate it with [WP-CLI](./wp-cli.mdx), and use [Troubleshooting](./troubleshooting.mdx) when something is refused. --- ## Export a site # Export a site :::caution Beta Static Export is in beta. See [what Beta means](./overview.mdx#what-beta-means). ::: This page takes you from switching Static Export on to a ZIP file of your site. To run the same steps from a terminal, see the [WP-CLI reference](./wp-cli.mdx). ## Turn Static Export on 1. In the Etch builder, click **Oh My Etch Components** in the toolbar and choose **Static Export**. 2. Switch on **Enable Static Export**. The panel then asks **Where should the site go?** and offers three destinations: - **Cloudflare** (**Recommended**, chosen at first): connect Cloudflare, then deploy, in two numbered steps. **Deploy to Cloudflare** exports the site and deploys that export with one click. See [Deploy to Cloudflare](./deploy-cloudflare.mdx). - **ZIP file**: export the site and download it as a ZIP file to host anywhere. This page walks through it. - **GitHub Pages** (**Coming soon**): not available in this version. To use GitHub Pages today, host the ZIP file there yourself. Each destination shows its own numbered steps. There is one export on the site, and switching destinations shows the same export and its result: in step 1, **Export the site**, under **ZIP file**, and in step 2, **Deploy**, under **Cloudflare**. Switching destinations stops nothing. An export, a deployment or a Cloudflare sign-in that is running goes on while another destination is shown. A destination whose deployment is running while you look at another one is marked **Deploying…**. ## Choose the site address Choose **ZIP file**. In its step 1, **Export the site**, open **Served from a folder?** to enter the site address in **Folder path**. It tells the export where the site will be served, so its links point to the right place. Leave it closed and empty for the root of a domain. While the field holds a value or an error, it stays open. Refusals and the WP-CLI option call the same value the **target base**. An export started from the **Cloudflare** destination is always made for the root of a domain, which is what a `workers.dev` address is, so that destination has no site address field. It leaves the value typed under **ZIP file** as it is. | Where the site will be served | What to enter | | ---------------------------------------------------------------------- | --------------------------------------- | | The root of a domain, such as `https://example.com/` | Leave the field empty. | | A Cloudflare `workers.dev` address | Leave the field empty. | | A GitHub Pages user or organization site, `https://.github.io/` | Leave the field empty. | | GitHub Pages with a custom domain set in the repository's settings | Leave the field empty. | | A GitHub Pages project site, `https://.github.io//` | `/`, for example `/my-repo` | | A folder of a domain, such as `https://example.com/docs/` | `/docs` | The value must start with `/` and must not end with `/`. Between the slashes it may contain only letters, digits, `-`, `.`, `_`, `~` and `%` followed by two hex digits. In a full address, write an international domain in its `xn--` form. A full address such as `https://example.com/docs` is also accepted. The links in the export then point to that address, so the copy works only there. A Cloudflare deployment warns you when such an export is published at another address. The site address is fixed when you export. To publish the same site at another address, export again with the new value. ## Run an export 1. Under **Where should the site go?**, choose **ZIP file**. 2. In step 1, **Export the site**, open **Served from a folder?** and enter the site address, or leave it closed for the root of a domain. 3. Under **Filters**, choose what to record of the facet lists: **All filters** (the default), **Pagination only** or **None**. See [Choose what is recorded](./what-works.mdx#choose-what-is-recorded). 4. Click **Export site**. When the site has facet lists, the panel records their filters right after the export, as chosen, without another click. See [Filters](#filters). Under **Cloudflare**, there is no **Export site**: **Deploy to Cloudflare** exports the site for the root of a domain, with no site address, and deploys it. See [Deploy to Cloudflare](./deploy-cloudflare.mdx#deploy). While the export runs, the panel shows **Export in progress** with a progress bar and a line such as `120 of 340 pages processed · 812 files · 24.6 MB`. At the start it shows **Finding the pages to export…** while it collects the addresses. :::note Keep this browser tab and the panel open until the export finishes (the panel says `Keep this tab open until it finishes.`). If you close either, the export pauses and the panel says `This export is paused.` Open the panel again and click **Continue export** to finish it, or **Cancel export** to stop it. ::: When the connection drops for a moment, the panel shows **Connection problem. Retrying…** and carries on by itself. Only one export or deployment runs at a time. While a deployment runs, **Export site** is not available until the deployment has finished or you have cancelled it. An export started with **Export site** never deploys. ## Which pages are exported The export starts from the addresses in WordPress's sitemaps (also when sitemaps are switched off for search engines) and follows the links it finds on each page. Password-protected posts are not taken from the sitemaps. Every page is fetched as an anonymous visitor, so the export shows what a visitor who is not logged in sees. Some addresses are always left out: - Addresses that only work with a query string, such as `/?p=12` or `/about/?lang=en`. - WordPress's dynamic and private addresses: anything under `wp-admin` or `wp-json`, feeds, `trackback` and `embed` addresses, PHP files and hidden folders (`.well-known` is kept). - Sitemap entries that point to another site. - WooCommerce pages. See [WooCommerce pages](./what-works.mdx#woocommerce-pages). An export stops when the site has more than 50,000 addresses to export. A developer can change that limit with the `ome_static_export_max_urls` filter, see [Filters](./wp-cli.mdx#filters). ## Read the summary When the export ends, the panel shows **Export finished**, **Export failed** or **Export cancelled**. The summary appears in step 1, **Export the site**, which then shows **Done**. A finished export lists **Pages**, **Files**, **Size** and **Duration** (`under 1 s` for a very small site), and **Filters** when the site has facet lists. **Problems** follow when there are any. **Left out of the export** and **Works differently on a static host** are under **Details**, closed until you open it, which the summary shows only when one of them has entries. ### Left out of the export Addresses the export skipped on purpose, with how many and a few examples: | What the panel says | What it means | | ---------------------------------------------------------------------------- | ----------------------------------------------------- | | WooCommerce pages such as shop, cart, checkout and account need a live store | WooCommerce pages, left out by address or by content. | | Addresses that only work with a query string (?…) | Pages reached only through `?…`, such as `/?p=12`. | | Dynamic, private or unrecognised addresses | Admin, REST, feed, PHP and similar addresses. | | Sitemap entries that point to another site | A sitemap listed an address on another domain. | ### Works differently on a static host Pages that were exported but contain something a static host cannot run: | What the panel says | What it means | | --------------------------------------------------------------------- | ----------------------------------------------------------------- | | Pages with forms: forms cannot be submitted on a static host | A form that sends its data to this WordPress site. | | Pages with a search form: search does not work on a static host | A site search form. | | Pages with a comment form: comments cannot be posted on a static host | WordPress's comment form. | | Pages with WooCommerce features that need a live store | A mini cart, an add-to-cart button or another WooCommerce widget. | | Part of the sitemap could not be read, so some pages may be missing | One page of a sitemap failed, so the export may be incomplete. | These pages look right on the static site, but the feature does not work there. See [What works on a static site](./what-works.mdx). ### Problems A table of addresses that failed or were skipped, with the columns **Address**, **Result** (**Failed** or **Skipped**), **HTTP status** and **Note**. Typical notes are `Not found on the site.`, `Redirects to another site.` and `The site answered with HTTP 500.` Fix the page in WordPress, or remove the link to it, then export again. ## Filters When the export has facet lists, **Export site** goes on with **Recording filters**, unless **Filters** is set to **None**: the panel runs the filters in your browser tab, with [Composed Filters](./what-works.mdx#composed-filters-and-facet-snapshots) where it can and every filter combination where it cannot, or only the result pages with **Pagination only**, and stores the results with the export. Keep the tab open until it finishes. Then the summary shows **Filters**, such as `4 lists`, `Pagination only` or `None`. The summary adds a line only when something needs you: - **Filters not recorded**, with the reason. **Export site** exports again and records them. - Lists too large for one export, which keep pagination only under **All filters**, for example `1 list has too many filter combinations for one export, so only its pagination is recorded.` See [Lists too large for one export](./what-works.mdx#lists-too-large-for-one-export). - `Search and map filters are left out on 2 lists.`, for controls a static host cannot answer. A list whose [text search](./what-works.mdx#text-search) was recorded is not counted. See [Facets: filters and lists](./what-works.mdx#facets-filters-and-lists). ## Download the ZIP Under **ZIP file**, click **Download ZIP** in step 2, **Download**. The panel shows **Preparing download…** while it packs the files. Before an export has finished, and while its filters are recorded, step 2 says `Available after the export.` The file is named after your site and the date, for example `example-com-static-export-2026-11-24.zip`. Unzip it and upload its contents to any static host, or [deploy to Cloudflare](./deploy-cloudflare.mdx) from the panel instead. To host the site on GitHub Pages, upload the unzipped files to a repository that has GitHub Pages switched on, after exporting with the matching site address (see the table above). Deploying to GitHub Pages from the panel is coming in a later version. When your site answers unknown addresses with its own 404 page, the export saves that page as `404.html`. GitHub Pages and Cloudflare show it for addresses that do not exist. ### Preview the download on your computer Do not open `index.html` by double-clicking it. The pages link to their stylesheets, scripts and each other with addresses that start at the root of the site (`/wp-content/…`), so they need a web server. Opened as a file, the page shows its text and images but loses the styles and scripts that come from separate files, such as a CSS framework's stylesheet. Serve the unzipped folder instead. With Python, which macOS and most Linux systems include: ```bash cd path/to/unzipped-folder python3 -m http.server 8000 ``` Then open `http://localhost:8000/`. Stop the server with Ctrl+C. If you entered a sub-path as the site address (for example `/my-site`), the export expects to live under that path, so preview it on the host instead. ## Export again after changes An export is a snapshot. After you change content in WordPress, export again (the filters are recorded again by themselves). Under **Cloudflare**, **Deploy to Cloudflare** does both: it exports again and deploys that export. The site keeps the export on its own server, in an `ome-static-export` folder inside the uploads folder. To keep it somewhere else, define [`OME_STATIC_EXPORT_DIR`](./wp-cli.mdx#constants). ## Turn Static Export off Switch off **Enable Static Export**. The confirmation **Turn off Static Export?** lists what is deleted: - the export stored on this site, so download the ZIP first if you still need it, - the saved Cloudflare token and the chosen Worker name, - and it stops an export or a deployment that is running. Turning it off also deletes a GitHub token, repository and branch saved while the [GitHub Pages preview](./deploy-github-pages.mdx) was on, even when the preview is off again and the confirmation does not name them. Click **Keep it on** to go back. Nothing on GitHub or Cloudflare is deleted. Tokens set in `wp-config.php` stay there. When you switch Static Export on again, you enter saved tokens again. --- ## What works on a static site # What works on a static site :::caution Beta Static Export is in beta. See [what Beta means](./overview.mdx#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](#composed-filters-and-facet-snapshots) only as far as [one export can hold them](#how-many-combinations). | | Facet pagination, load more, infinite scroll and reset | Work. | | Free-text search facet | Works on a list recorded with Composed Filters, see [Text search](#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](#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](#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](#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](#text-search) is recorded, the dataset also holds a search file; see [What the search file publishes](#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](./troubleshooting.mdx#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](./wp-cli.mdx#filters). ### Lists too large for one export This applies only to lists that are not recorded with [Composed Filters](#composed-filters-and-facet-snapshots). 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](./troubleshooting.mdx#recording-filters). 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](./wp-cli.mdx) 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](../facets/overview.mdx). ## 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](#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](../woo/overview.mdx). --- ## Deploy to GitHub Pages (preview) # Deploy to GitHub Pages (preview) :::caution Preview, switched off in this version Deploying to GitHub Pages from the panel is not available in this version yet. Under **Where should the site go?** the panel shows **GitHub Pages** with the badge **Coming soon**, and the tab cannot be chosen. `wp oh-my-etch static-export deploy github` refuses with `GitHub Pages deployment is not available in this version yet.` To host the site on GitHub Pages today, [export it as a ZIP file](./export-a-site.mdx) with the site address from the table below, and upload the unzipped files to the repository yourself. The rest of this page describes the preview. You can turn it on for testing by adding this line to `wp-config.php`: ```php define( 'OME_STATIC_EXPORT_GITHUB_PREVIEW', true ); ``` Use it at your own risk. The preview may change or be removed in any release, and nothing on this page is promised to stay as described. ::: :::caution Beta Static Export is in beta. See [what Beta means](./overview.mdx#what-beta-means). ::: With the preview on, the **GitHub Pages** destination of the Static Export panel commits your last finished export to a branch of a GitHub repository and turns on GitHub Pages for it. This page walks through the token, the first deployment, and what happens on later ones. Under **Where should the site go?**, choose **GitHub Pages**, now marked **Preview**. It has three numbered steps: 1. **Connect GitHub**: connect a token. The step shows **Done** once it is connected. 2. **Export the site**: enter the **Site address on the static host**, choose what to record under **Filters** (see [Choose what is recorded](./what-works.mdx#choose-what-is-recorded)), then click **Export site**. See [Before you start: the site address](#before-you-start-the-site-address). 3. **Deploy**: choose the repository and branch, test the connection and deploy. Until GitHub is connected, this step says `Connect GitHub first, then deploy.` Switching to another destination stops nothing. A deployment that is running goes on, and the **GitHub Pages** destination is marked **Deploying…** meanwhile. ## Before you start: the site address GitHub Pages serves a repository in one of these places. Export with the matching **Site address on the static host** (step 2 of **GitHub Pages**, or **Folder path** under **Served from a folder?** in step 1 of **ZIP file**): | Repository | Address on GitHub Pages | Site address to export with | | ------------------------------------------------------------- | ------------------------------------- | --------------------------- | | A project repository, such as `octo-org/my-site` | `https://octo-org.github.io/my-site/` | `/my-site` | | The user or organization site, `octo-org/octo-org.github.io` | `https://octo-org.github.io/` | Leave empty | | Any repository with a custom domain set in its Pages settings | Your domain | Leave empty | The deployment checks this. When GitHub Pages is on and the export was made for another path, the deployment is refused; see [Exported for another address](#exported-for-another-address). ## Create the token Use a fine-grained personal access token limited to the one repository you deploy to. 1. On GitHub, open [Settings → Developer settings → Personal access tokens → Fine-grained tokens](https://github.com/settings/personal-access-tokens/new) and create a new token. 2. Set an expiry date. 3. Under repository access, choose only the one repository you deploy to. 4. Give it these repository permissions: - **Contents: Read and write** - **Pages: Read and write** 5. Optional: **Administration: Read and write**. It only lets the plugin switch GitHub Pages on for you. Without it, switch GitHub Pages on once by hand (see [Switch GitHub Pages on by hand](#switch-github-pages-on-by-hand)). 6. GitHub adds **Metadata: Read-only** by itself. 7. Generate the token and copy it. The most secure setup is to put the token in `wp-config.php` instead of pasting it into the panel, so it never enters the database: ```php define( 'OME_STATIC_EXPORT_GITHUB_TOKEN', 'github_pat_…' ); ``` See [Keeping tokens safe](./keeping-tokens-safe.mdx). ## Connect If you defined the token in `wp-config.php`, step 1 already reads **Connected** and says the token can only be changed there. Skip to the next step. Otherwise: 1. Paste the token into **Token**. 2. Click **Connect**. The status changes to **Connected**. Saving only stores the token on this site, encrypted; it is not sent to GitHub yet and is never shown again. **Replace token** and **Disconnect** appear under it. ## Choose the repository and branch These fields are in step 3, **Deploy**. 1. Enter the **Owner** (the GitHub user or organization) and the **Repository** name. You can also paste `owner/repo` or the repository's address into either field to fill both. 2. Optional: enter a **Branch**. This is the branch GitHub Pages publishes from, at its root folder. Leave it empty to use `gh-pages`. 3. Click **Save repository**. 4. Click **Test connection**. The test asks GitHub whether the token works, what it may do in the repository, and whether GitHub Pages is on. **Connection works** lists the repository (public or private), whether the branch exists, whether GitHub Pages is on and from which branch and folder, and the address the site will have. It also warns about anything that would stop the deployment, for example: - **Export again for this address**, when the last export was made for another path. It names the value to enter in **Site address on the static host**. - The repository is private. GitHub Pages on a private repository needs a paid GitHub plan. - The repository is archived, or the token may not push to it. - GitHub Pages is off, publishes with a GitHub Actions workflow, or publishes from another branch or folder. ## Deploy In step 3, click **Deploy to GitHub Pages**. The panel shows **Deployment in progress** and the step it is on: checking files, **Comparing with what is on the branch…**, uploading files, **Making the commit…**, then **Waiting for GitHub Pages to publish the site…**. :::note Keep this browser tab and the panel open until the deployment finishes. If you close either, the deployment pauses. Open the panel again and click **Continue deployment**, or **Cancel deployment**. ::: When it is done, the panel shows **Deployed to GitHub Pages**, the address (`The site is live at …`), the commit, and how many files were uploaded and how many were already on the branch. What a deployment does on GitHub: - The export becomes the whole content of the branch, in one commit. The branch's history is kept. - If the branch does not exist yet, the first deployment creates it. - The deployment adds a `.nojekyll` file, so GitHub Pages serves the files as they are. When a custom domain is set in the repository's Pages settings, it also writes the `CNAME` file, so the domain is kept. - If GitHub Pages is off and the token has **Administration: Read and write**, the deployment switches it on for the branch, root folder. - It waits up to 10 minutes for GitHub Pages to publish. If Pages has not finished by then, the deployment still ends as deployed, with the warning **GitHub Pages is still publishing**. Check the repository's **Settings → Pages** a few minutes later. - Nothing on GitHub is ever deleted, and a branch is never force-pushed. ### An empty repository A repository without any commit is fine. The first deployment creates the Pages branch as the repository's first branch, so GitHub makes it the repository's default branch. If you add another branch later and want it as the default, change the default branch in the repository's settings. ### Sites with many files GitHub receives the files one by one, about one per second. When more than 600 files must be sent, the deployment warns **Uploading is slow**. The first deployment of a large site can take a while; later ones send only the files that changed. ## Later deployments Export again, then click **Deploy to GitHub Pages** again. - Only the files that changed since the branch's last commit are sent. Everything else is reused. - When the branch already holds exactly this export, committed by this site, no new commit is made. The command line says `The branch … already holds this export, so nothing was committed.` ## When the branch holds commits from elsewhere The plugin replaces a branch only when this site made its last commit. If someone else committed to the branch, or it is an existing branch you chose, the deployment stops and asks first: > **Replace the files on the branch gh-pages?** The branch gh-pages of octo-org/my-site, at commit 1a2b3c4, has content that was not deployed by this site; deploying adds a commit that replaces its files with this export, and the branch's history is kept. Because the history is kept, the earlier files can still be restored from it. - **Replace its files and deploy** goes ahead. Your consent covers exactly that commit. - **Keep the branch** stops. Nothing is deployed and the branch stays as it is. To deploy without replacing it, choose another branch. If the branch moves again before the deployment starts, the dialog shows **This changed since you confirmed.** with the old and new commit. Check the branch and confirm again, or keep it. ## Exported for another address When GitHub Pages is on and serves the repository at another path than the export was made for, the deployment is refused: > This export was made to be served at /, but GitHub Pages serves octo-org/my-site at https://octo-org.github.io/my-site/, so its links would not work there. Export again with the target base /my-site, then deploy. Export again with **Site address on the static host** set to the value the message names (`/my-site` here), then deploy. While GitHub Pages is still off, the same message appears as the warning **Exported for another address** and the deployment goes ahead. ## A protected branch If a branch protection rule or ruleset forbids the token to push, the deployment fails with **GitHub refused to update the branch**: > GitHub refused the branch gh-pages, which nobody else changed: a branch protection rule or ruleset may forbid this token from pushing to it. GitHub says: … The text after `GitHub says:` is GitHub's own reason. Allow the push in the repository's rules, or deploy to another branch. ## Switch GitHub Pages on by hand Without the **Administration** permission, the first deployment commits the site and then warns **GitHub Pages is not on**. In the repository on GitHub: 1. Open **Settings → Pages**. 2. Under **Build and deployment**, choose **Deploy from a branch**. 3. Choose the branch you deploy to and the folder **/ (root)**, and save. If Pages is set to **GitHub Actions**, the deployment is refused, because a branch would not be published. Change the source to **Deploy from a branch**. ## Cancel or dismiss **Cancel deployment** stops a running deployment. Nothing already published on GitHub Pages is removed. If the request that updates the branch was already on its way, the branch can still receive the commit; the next deployment updates it without asking. When a deployment has ended, **Dismiss** removes its result from the panel. It does not change anything on GitHub. ## Disconnect **Disconnect** deletes the saved token from this site. The repository and what GitHub Pages serves are not changed. A running deployment stops. To deploy again, connect a token again. A token in `wp-config.php` can only be removed there. Revoke the token on GitHub as well when you no longer need it. ## Limits - At most 100,000 files per deployment, because GitHub lists at most that many files of a branch. - At most 1 GB for the whole site, GitHub Pages' limit for a published site. - At most 25 MiB per file. When an export is over a limit, the deployment is refused before anything is sent. See [Troubleshooting](./troubleshooting.mdx#github-pages). To deploy from a terminal, see [`wp oh-my-etch static-export deploy github`](./wp-cli.mdx#deploy-github). --- ## Deploy to Cloudflare # Deploy to Cloudflare :::caution Beta Static Export is in beta. See [what Beta means](./overview.mdx#what-beta-means). ::: The **Cloudflare** destination of the Static Export panel exports your site and publishes that export as a Cloudflare Worker that serves static files (Workers static assets). The site is served at `https://..workers.dev`. This page walks through connecting your account, the first deployment, and what happens on later ones. Under **Where should the site go?**, choose **Cloudflare**. It is the recommended destination and is chosen when the panel opens. It has two numbered steps: 1. **Connect Cloudflare**: connect your account. The step shows **Done** once deployments can use the connection. 2. **Deploy**: choose the Worker name, test the connection and click **Deploy to Cloudflare**, which exports the site and deploys that export. Until Cloudflare is connected, this step says `Connect Cloudflare first, then deploy.` You can switch to another destination at any time. A sign-in or a deployment that is running goes on, and the **Cloudflare** destination is marked **Deploying…** while its deployment runs. ## Before you start Your Cloudflare account needs a `workers.dev` subdomain. If you have never used Workers, open **Workers & Pages** in the Cloudflare dashboard once and choose one. The plugin cannot create it for you. There are three ways to connect: - **Connect with Cloudflare** (recommended): you sign in to Cloudflare and approve. There is no token to create and no account ID to look up. - **Paste an API token**: you create a token on Cloudflare yourself and paste it into the panel. The token can be limited more narrowly. - **Define the token in `wp-config.php`**: the most locked-down setup, because nothing is stored in the database. [Keeping tokens safe](./keeping-tokens-safe.mdx#comparing-the-three-ways-to-connect-cloudflare) compares them. ## Connect with Cloudflare When step 1 reads **Not connected**, it shows the button **Connect with Cloudflare** and, under it: > Oh My Etch gets Workers Admin on the account you choose, so it can manage every Worker on it. Cloudflare opens in a new tab, where you choose the account to deploy to. Oh My Etch then gets permission to deploy and manage Workers on that account, which Cloudflare lists as **Workers Admin**. That covers every Worker of the account, not only this site's. A [pasted API token](#or-paste-an-api-token) can be limited more narrowly. 1. Click **Connect with Cloudflare**. Cloudflare opens in a new tab. The panel shows **Waiting for Cloudflare…** and `Finish the sign-in in the Cloudflare tab.` The section updates by itself when you are done. 2. In the Cloudflare tab, sign in if asked, choose the account to deploy to, and approve. 3. Cloudflare then sends you to a page on `connect.ohmyetch.com` titled **Finish connecting Cloudflare to this WordPress site?** It shows the address of the WordPress site it will continue to. Check that this is your own site, then click **Continue to …** (your site's address). 4. Your site finishes the connection and says `Cloudflare is connected. You can close this tab and go back to Oh My Etch.` 5. Close the tab. Back in the panel, step 1 reads **Connected**, shows the account's name and ID, and is marked **Done**. The administrator who started the sign-in must finish it, in the same browser, within 10 minutes. If you closed the Cloudflare tab by mistake, use **Open Cloudflare again** under **Waiting for Cloudflare…**. **Cancel** stops waiting and cancels the sign-in. If the sign-in was already on its way back when you clicked **Cancel**, the panel shows **Finishing the connection…** until the site knows the result. If it then reads **Connected** and you do not want the connection, click **Disconnect**. If you decline on Cloudflare, or the sign-in fails in the other tab, the panel goes back to **Connect with Cloudflare** within a few seconds and says that the sign-in was not finished. The page in the other tab says why. ### What to check on the connect.ohmyetch.com page Cloudflare only sends people back to one address that was registered in advance, while Oh My Etch runs on any domain. So Cloudflare sends you to `connect.ohmyetch.com` first, and that page hands the result on to your site. - Continue only when the address shown is your own site and you started the sign-in from its WordPress admin a moment ago. Read the whole address, not only the domain name: when several sites share one domain, the part after it tells them apart. If you did not, close the page. Nothing is connected unless you continue. - Names that only look like another name are shown in their technical form, starting with `xn--`. If you see such a name and did not expect it, close the page. The page sees a one-time code that cannot be used without a key that never leaves your site. It does not see any token, and it stores and logs nothing. ### When you approved several accounts If you chose more than one account on Cloudflare, your site says `Cloudflare is connected. Close this tab and choose the account in the Static Export panel.` Step 1 then reads **Choose an account** and lists the accounts. Select one and click **Use this account**. The site is deployed to the account you choose. ### What the sign-in needs - **HTTPS.** The site must be served over HTTPS. Local sites on `localhost`, `*.localhost`, `*.local`, `*.test`, `127.0.0.1` or a private network address may use plain `http://`. Otherwise step 1 says `Connect with Cloudflare needs HTTPS. Paste an API token instead, or serve the site over HTTPS.` and shows the token form instead of the button. - **No token in `wp-config.php`.** When `OME_STATIC_EXPORT_CLOUDFLARE_API_TOKEN` is defined, step 1 uses that token and does not offer the sign-in. - **The connect.ohmyetch.com page must be up.** The sign-in depends on it. A pasted token does not. ### What the site stores Cloudflare gives your site a token that works for one hour and a second token that lets the site get a new one. Both are stored encrypted, like a pasted token, and are never shown again. The site renews the first token by itself when a deployment or **Test connection** needs it. See [What a sign-in stores](./keeping-tokens-safe.mdx#what-a-sign-in-stores). ## Or paste an API token Under **Connect with Cloudflare**, open **Advanced: paste an API token**. When the sign-in is not available on your site, the token form is shown directly. ### Create the API token 1. In the panel, under **API token**, follow the link **Cloudflare's API token form**. It opens the Cloudflare dashboard with a new token that already has the only permission needed: **Account → Workers Scripts → Edit**. You can also open the [same form](https://dash.cloudflare.com/profile/api-tokens?permissionGroupKeys=%5B%7B%22key%22%3A%22workers_scripts%22%2C%22type%22%3A%22edit%22%7D%5D&accountId=%2A&zoneId=all&name=Oh%20My%20Etch%20Static%20Export) from here. 2. Under **Account Resources**, limit the token to only the one account you deploy to. 3. Create the token and copy it. If the form opens empty, create a custom token under **My Profile → API Tokens** and give it that one permission yourself. You also need the **account ID**. You find it on the **Workers & Pages** overview of the Cloudflare dashboard. It is 32 characters long. The most secure setup is to put both in `wp-config.php` instead of pasting them into the panel, so the token never enters the database: ```php define( 'OME_STATIC_EXPORT_CLOUDFLARE_API_TOKEN', '…' ); define( 'OME_STATIC_EXPORT_CLOUDFLARE_ACCOUNT_ID', '0123456789abcdef0123456789abcdef' ); ``` See [Keeping tokens safe](./keeping-tokens-safe.mdx). ### Connect with the token If you defined both constants in `wp-config.php`, step 1 already reads **Connected** and shows the account ID. Skip to the next step. Otherwise: 1. Paste the token into **API token**. 2. Enter the **Account ID**. 3. Click **Connect**. The status changes to **Connected** and shows the account ID. Saving only stores the token on this site, encrypted; it is not sent to Cloudflare yet and is never shown again. **Replace token** and **Disconnect** appear under it. If you paste a token while step 1 reads **Connection ended**, the token replaces the sign-in. When Cloudflare cannot be reached to end that sign-in, the panel says `The token is saved, but the earlier sign-in could not be ended: remove Oh My Etch under Connected Applications in your Cloudflare profile.` If the site was connected with **Connect with Cloudflare**, there is no **Replace token**. Click **Disconnect** first, then paste the token. ## Choose the Worker name The Worker name and **Test connection** are in step 2, **Deploy**. The **Worker name** decides the address: `https://..workers.dev`. Leave the field empty to use the default, a name made from your site's host, which the field shows as its placeholder. A Worker name is 1 to 63 lower-case letters, digits and dashes, and cannot start or end with a dash. 1. Enter a name, or leave the field empty. 2. Click **Save name**. 3. Click **Test connection**. The test asks Cloudflare whether the connection works and which `workers.dev` subdomain the account has. When it works, the panel says `Connection works: the site will be served at …` with the full address. ## Deploy In step 2, choose under **Filters** what to record of the facet lists, right above the button: **All filters** (the default), **Pagination only** or **None**. See [Choose what is recorded](./what-works.mdx#choose-what-is-recorded). The choice applies when you click the button; changing it deploys and records nothing by itself. Then click **Deploy to Cloudflare**. It runs three parts one after the other, and step 2 shows each while it runs: 1. **The export.** Every click exports the site again, so the deployment always publishes the site as it is now. An export started here is always made for the root of a domain, because a `workers.dev` address is the root of its own domain, so there is no site address to enter. See [Export a site](./export-a-site.mdx). 2. **Recording filters**, when the site has facet lists, as chosen under **Filters**. With **None**, nothing is recorded and the deployment starts right after the export. See [Facets: filters and lists](./what-works.mdx#facets-filters-and-lists). 3. **The deployment**, which uploads that export to the Worker you named. During the deployment the panel shows **Deployment in progress**, with the step it is on: checking files, **Preparing the upload…**, uploading files, **Publishing the site…**, then **Turning on the address…**. When Cloudflare asks to wait, the panel counts down and tries again by itself. :::note Keep this browser tab and the panel open until the deployment finishes. If you close either, the deployment pauses. Open the panel again and click **Continue deployment**, or **Cancel deployment**. ::: When it is done, the panel shows **Deployed to Cloudflare**, the address (`The site is live at …`), and how many files were uploaded and how many were already on Cloudflare. The summary of the export, **Export finished**, follows in the same step. Nothing is deployed when the export fails or is cancelled, or when recording the filters is cancelled, stops or fails. A recording that could not record some lists still deploys. Step 2 then shows the result of the export, and when the site was deployed before, `Last deployment, …` with the address and the time of that earlier deployment: the new export is not live. Click **Deploy to Cloudflare** to try again. An export that was paused, for example because the tab was closed, never deploys by itself. **Continue export** finishes it; click **Deploy to Cloudflare** afterwards to export and deploy. The deployment turns on the Worker's `workers.dev` address and turns off its preview URLs. When your site has a 404 page, Cloudflare shows it for addresses that do not exist. ## Later deployments Click **Deploy to Cloudflare** again. It exports the site again and uploads only the files Cloudflare does not have yet; the result says how many were already there. ## A Worker this site did not create When a Worker with the chosen name already exists on the account and was not deployed from this site, the deployment stops and asks first: > **Replace the Worker my-site?** The Worker my-site already exists on this Cloudflare account and was not deployed from this site; deploying replaces it with this export. - **Replace it and deploy** goes ahead and replaces that Worker. - **Keep the Worker** stops. Nothing is deployed and the Worker stays as it is. The export that was just made stays. To deploy without replacing it, choose another Worker name. Workers this site deployed carry a tag that identifies the site, so later deployments to them do not ask. ## Plan limits | Limit | Workers Free | Workers Paid | | ---------------- | ------------ | ------------ | | Files per Worker | 20,000 | 100,000 | | Size of one file | 25 MiB | 25 MiB | When the export has more than 20,000 files, the deployment warns that it needs the Workers Paid plan and goes ahead; Cloudflare refuses it if your account is on the Free plan. An export with more than 100,000 files, or with a file over 25 MiB, is refused before anything is uploaded. Recorded filters add files. If an export is over the limit because of them, choose **Pagination only** or **None** under **Filters**, then click **Deploy to Cloudflare** again. ## Cancel **Cancel deployment** stops a running deployment. Nothing already live on Cloudflare is removed. - If the request that publishes the site was already on its way, the site can still go live; the next deployment updates it without asking. - A first deployment that is cancelled or fails part-way can leave an empty Worker with that name on your account. It serves nothing. The next deployment to the same name reuses it without asking. The plugin never deletes a Worker; delete it in the Cloudflare dashboard if you no longer want it. ## Custom domain The plugin publishes to the `workers.dev` address only. To serve the site on your own domain, add the domain to the Worker in the Cloudflare dashboard. An export from the **Cloudflare** destination is made for the root of a domain, which is what you need when the site is served at the root of that domain. **Deploy to Cloudflare** always exports for the root first, so an export made under **ZIP file** with a site address never reaches the panel's deployment. The [WP-CLI](./wp-cli.mdx) `deploy cloudflare` command publishes the last finished export instead, wherever it was started. An export made with a path, such as `/docs`, is then served under that path on `workers.dev`. An export made for a full address, such as `https://example.com`, is served at the root but its links still point to that address; the deployment warns about it. ## Disconnect **Disconnect** asks first, then removes the connection from this site. A running deployment stops; nothing already live on Cloudflare is removed. A token in `wp-config.php` can only be removed there. - **Connected with Cloudflare:** the site forgets the connection and asks Cloudflare to end it. If Cloudflare cannot be reached, the panel says: `This site is disconnected, but Cloudflare could not be reached: remove Oh My Etch under Connected Applications in your Cloudflare profile.` To do that, open your profile in the Cloudflare dashboard and go to **Connected Applications**. - **Pasted token:** the token is deleted from this site. Delete it in the Cloudflare dashboard as well when you no longer need it. To deploy again, connect again. Turning Static Export off does the same as **Disconnect**. ## Connection ended A connection made with **Connect with Cloudflare** can be ended by Cloudflare. Step 1 then reads **Connection ended**: > Cloudflare ended this connection: connect again to deploy. Click **Connect with Cloudflare** to connect again. The usual cause is a copy of the site, such as a staging site made from a copy of the production database. It can also happen after a long time without deploying. Both copies then hold the same connection. Cloudflare lets the site use each renewal only once, so when both copies deploy, Cloudflare ends the connection for both. To avoid it, connect each copy on its own after copying, so each gets its own connection, or use a pasted API token on the copy. To deploy from a terminal, see [`wp oh-my-etch static-export deploy cloudflare`](./wp-cli.mdx#deploy-cloudflare). --- ## Keeping tokens safe # Keeping tokens safe :::caution Beta Static Export is in beta. See [what Beta means](./overview.mdx#what-beta-means). ::: A deployment needs a token that can write to your Cloudflare Workers. The site gets one either from a token you create, or by **Connect with Cloudflare**. This page explains what the plugin does to protect that token, the setup we recommend, and what the plugin cannot protect against. What this page says about GitHub tokens applies only to the [GitHub Pages preview](./deploy-github-pages.mdx), which is switched off in this version. Without it the panel asks for no GitHub token. A GitHub token saved while the preview was on is still deleted when you turn Static Export off or uninstall the plugin. ## Who can use Static Export Static Export, including its tokens, is available only to users who can manage the site's options, which in a standard WordPress site means administrators. Every request the panel makes also needs a valid WordPress session. On a multisite network, a token set in `wp-config.php` belongs to the whole network, so only a network administrator can deploy with it. Static Export is not supported on networks as a whole; see [What is not supported](./overview.mdx#what-is-not-supported). ## What happens to a token you paste into the panel - It is stored in the WordPress database, encrypted. Saving does not send it to GitHub or Cloudflare. - It is never shown again: no screen, request, WP-CLI command, log line, error message or export file returns it or any part of it. The panel only ever learns whether a token is connected. - The plugin sends it only to `api.github.com` or `api.cloudflare.com`. These requests do not pass through WordPress's HTTP hooks, so other plugins that log outgoing requests do not see it. They still respect `WP_HTTP_BLOCK_EXTERNAL`, `WP_ACCESSIBLE_HOSTS` and the WordPress proxy settings. - It is deleted when you click **Disconnect**, when you turn Static Export off, and when you uninstall the plugin. ## What a sign-in stores **Connect with Cloudflare** stores no token you created. Instead, Cloudflare gives the site two tokens: - one that deploys, and works for one hour; - a second one that only lets the site get a new first token when the hour is up. Both are stored exactly like a pasted token: encrypted with the same key and never shown again. They are sent only to Cloudflare, at `api.cloudflare.com` and `dash.cloudflare.com`. The site renews the first token by itself when a deployment or **Test connection** needs it. The sign-in passes through a page on `connect.ohmyetch.com`, run by the makers of Oh My Etch, because Cloudflare only sends people back to one fixed address. That page sees a one-time code, which is useless without a key that never leaves your site. It sees no token, and it stores and logs nothing. The permission is Cloudflare's **Workers Admin** for the account you chose. It covers every Worker of that account, not only this site's. It does not reach KV, R2, D1, Pages, your API tokens or the account's members. It cannot be limited to one Worker. **Disconnect** removes both tokens from the site and asks Cloudflare to end the connection. Turning Static Export off does the same. Uninstalling the plugin deletes the tokens from the site but does not contact Cloudflare, so **Oh My Etch** can stay listed in your Cloudflare profile under **Connected Applications**, with no token left that works. Remove it there if you want. ## Comparing the three ways to connect Cloudflare | | Connect with Cloudflare | Pasted API token | Token in `wp-config.php` | | ---------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | Permission | Workers Admin on the chosen account: every Worker | What you give it; we recommend Workers Scripts: Edit on one account | What you give it; we recommend Workers Scripts: Edit on one account | | Where it lives | The database, encrypted | The database, encrypted | `wp-config.php` or the server environment | | Expiry | Renewed by the site; ends on Disconnect or at Cloudflare | The expiry date you set on Cloudflare | The expiry date you set on Cloudflare | | A copy of the database | Both copies hold the same connection; when both deploy, Cloudflare ends it for both | The copy holds the same token, which keeps working on both | A database copy does not carry it | The sign-in is the easiest to set up. A pasted token can be limited more narrowly. A token in `wp-config.php` is the most locked-down, and when it is defined the panel does not offer the sign-in. ## Recommended: define the token in `wp-config.php` A token defined in `wp-config.php` never enters the database. Add the lines above the `/* That's all, stop editing! */` line: ```php // GitHub Pages (preview only). define( 'OME_STATIC_EXPORT_GITHUB_TOKEN', 'github_pat_…' ); // Cloudflare. define( 'OME_STATIC_EXPORT_CLOUDFLARE_API_TOKEN', '…' ); define( 'OME_STATIC_EXPORT_CLOUDFLARE_ACCOUNT_ID', '0123456789abcdef0123456789abcdef' ); ``` You can also set environment variables with the same names on the server. The panel then shows that the token is set in `wp-config.php` (or the server environment) and can only be changed there. WP-CLI deployments use it as well. Keep `wp-config.php` out of version control and backups that other people can read. ## The encryption key A pasted token is encrypted with a key that comes from: - the `OME_STATIC_EXPORT_SECRET_KEY` constant, when it is defined, or - otherwise the WordPress security keys and salts. When WordPress keeps its salts in the database instead of `wp-config.php`, the panel warns: > This site keeps its security keys in the database, so the saved token is weakly protected: define `OME_STATIC_EXPORT_SECRET_KEY` (at least 32 random characters) in `wp-config.php`, then enter the token again. Weakly protected means that anyone who can read the database could decrypt the saved token. This is typical on WP Studio, whose `wp-config.php` defines no salts. To remove the warning: 1. Define a random string of at least 32 characters in `wp-config.php`: ```php define( 'OME_STATIC_EXPORT_SECRET_KEY', 'replace-with-a-long-random-string-of-at-least-32-characters' ); ``` 2. Enter the token again in the panel, or click **Connect with Cloudflare** again if you signed in. The old one was encrypted with the old key. Or put the token itself in `wp-config.php`, as described above. `OME_STATIC_EXPORT_SECRET_KEY` must be a constant; an environment variable is not read. A value shorter than 32 characters is never used and never replaced by the salts: the panel then refuses to save a token (`This site cannot encrypt the token, so it was not saved.`). Changing the key or the salts makes a saved token unreadable. The panel then shows **The saved token cannot be read**; enter the token again, or disconnect. A Cloudflare sign-in shows **Connection ended** instead; connect again. ## Use least-privilege tokens with an expiry date A token that can do little does little harm if it leaks. - **GitHub (preview only):** a fine-grained token for only the one repository, with **Contents: Read and write** and **Pages: Read and write**, and **Administration: Read and write** only if you want the plugin to switch GitHub Pages on. See [Create the token](./deploy-github-pages.mdx#create-the-token). - **Cloudflare:** a token with only **Account → Workers Scripts → Edit**, limited to one account. See [Create the API token](./deploy-cloudflare.mdx#create-the-api-token). A sign-in has a wider permission; see [What a sign-in stores](#what-a-sign-in-stores). - Give tokens an expiry date where the host offers one, and replace them before they expire with **Replace token**. ## Disconnecting **Disconnect** in step 1 of the **Cloudflare** destination (or of **GitHub Pages**, with the preview on) deletes the saved token from this site, after a confirmation. For a pasted token it does not change anything on the host, and it does not revoke the token there. When you stop using a token, also revoke it on GitHub or delete it in the Cloudflare dashboard. For a connection made with **Connect with Cloudflare**, **Disconnect** also asks Cloudflare to end it. If Cloudflare cannot be reached, the panel says so; remove **Oh My Etch** under **Connected Applications** in your Cloudflare profile. Turning Static Export off deletes the saved tokens of both hosts together with the export, and ends a Cloudflare sign-in the same way **Disconnect** does. ## What the plugin cannot protect against A token that the server must send cannot be made unrecoverable on that server. In plain words: - Anyone who can read both the site's files and its database, or who can run PHP on the site (including any other plugin), can recover a saved token. - When you paste a token, it travels to WordPress in a request. A plugin that logs incoming REST requests could see it at that moment. A token in `wp-config.php` avoids this. - While a deployment runs, the token is in the server's memory. A plugin that records full error backtraces during that request could capture it. - For a Cloudflare sign-in, another plugin could change the address Cloudflare sends you back to. The `connect.ohmyetch.com` page shows that address before you continue, so check it. Least-privilege tokens with an expiry date keep the damage small if any of this happens. --- ## Local sites (WP Studio, LocalWP) # Local sites (WP Studio, LocalWP) :::caution Beta Static Export is in beta. See [what Beta means](./overview.mdx#what-beta-means). ::: The recommended way to use Static Export is to keep WordPress on your own computer and publish only the static copy. Your WordPress site then never has to be reachable from the internet, and visitors only ever reach static files. This page lists what to know for the two supported local tools. ## How it works on a local site The export reads your pages from the site itself, so the site does not need a public address. Deployments connect from your computer to Cloudflare, so your computer needs internet access while you deploy. **Connect with Cloudflare** works on local sites without HTTPS. Sites on `localhost`, `*.localhost`, `*.local`, `*.test`, `127.0.0.1` or a private network address may use plain `http://`. The page on `connect.ohmyetch.com` then notes that it is a local site. Only your browser goes back to the local address, so the site does not need to be reachable from the internet. See [Connect with Cloudflare](./deploy-cloudflare.mdx#connect-with-cloudflare). The usual cycle: 1. Edit the site in WordPress on your computer. 2. [Export it](./export-a-site.mdx). Its facet filters are recorded with it. 3. Deploy to [Cloudflare](./deploy-cloudflare.mdx), or [download the ZIP](./export-a-site.mdx#download-the-zip) and upload it to your static host. ## WP Studio WP Studio is supported, including its SQLite database. WP Studio's `wp-config.php` defines no security keys and salts, so WordPress keeps them in the database. When you paste a token or use **Connect with Cloudflare**, the panel warns that the saved token is weakly protected. To remove the warning, define `OME_STATIC_EXPORT_SECRET_KEY` in the site's `wp-config.php` and enter the token again (or connect again), or define the token itself there. See [The encryption key](./keeping-tokens-safe.mdx#the-encryption-key). To run the [WP-CLI commands](./wp-cli.mdx), use Studio's own command line from a terminal: `studio wp --path oh-my-etch static-export run`. ## LocalWP LocalWP is supported and behaves like a normal server, so there is nothing special to set up. To run the [WP-CLI commands](./wp-cli.mdx), open the site in Local and choose **Open Site Shell**, then run them there. ## Local sites with a custom HTTPS domain Sites served on a custom local domain over HTTPS with a self-signed certificate (LocalWP's site domains router mode, or WP Studio with a custom domain and HTTPS) have not been tested yet. They are expected to work: the export only fetches pages from your own site and, like WordPress's own requests to itself, does not check the certificate for them. If you meet a problem there, please report it. ## When the site cannot reach itself The export fetches pages from the site's own address. If the server cannot reach that address, for example because WordPress runs in a container, the export tries `127.0.0.1` on the same port, then on port 80. When none of these works, define the address the server can use in `wp-config.php`: ```php define( 'OME_STATIC_EXPORT_LOOPBACK_URL', 'http://wordpress' ); ``` The value is an address with `http://` or `https://` and an optional port, without a path. When it is defined, the export tries it first. If none of the addresses answers, the **Problems** table of the export shows the note `No connection base answered: …`. :::note For plugin developers using wp-env In wp-env, the `cli` container cannot reach the site on its own address. Define `OME_STATIC_EXPORT_LOOPBACK_URL` as `http://wordpress` for WP-CLI exports, for example through `wp --require=`. ::: --- ## WP-CLI and configuration reference # WP-CLI and configuration reference :::caution Beta Static Export is in beta. Its commands, constants and filters may change between releases. See [what Beta means](./overview.mdx#what-beta-means). ::: Everything the panel does, except recording filters, can also be done from a terminal with WP-CLI. This page lists every command, then the constants and filters that change how Static Export behaves. Run the commands in the WordPress folder of your site, as you run any `wp` command. On LocalWP, use **Open Site Shell**; see [Local sites](./local-sites.mdx). Every command exits with `0` when it succeeded and with a non-zero status when it was refused, failed or was cancelled, so you can use them in scripts. ## Export then deploy A complete run, from switching the feature on to a live site: ```bash # Once: switch Static Export on. wp oh-my-etch static-export enable # Export the site for the root of a domain, as a workers.dev address is. wp oh-my-etch static-export run # Deploy it. The connection comes from the panel or wp-config.php. wp oh-my-etch static-export deploy cloudflare --name=my-site # Check the result. wp oh-my-etch static-export deploy status ``` To host the site somewhere else, export it as a ZIP file with the matching target base, for example for a GitHub Pages project site at `https://octo-org.github.io/my-site/`: ```bash wp oh-my-etch static-export run --target-base=/my-site --zip=./site.zip ``` Deploying to GitHub Pages with `deploy github` is a preview that is switched off in this version; see [`deploy github`](#deploy-github). :::note An export made with WP-CLI does not record facet filters, because recording runs in a browser: each list shows its first page, with its filters hidden. To publish a site with working filters, export it in the Static Export panel with **Export site**, which records them by itself. Then deploy from the panel or with `deploy cloudflare`. ::: ## Export commands ### `enable` Turns Static Export on. ```bash wp oh-my-etch static-export enable ``` ### `disable` Turns Static Export off. ```bash wp oh-my-etch static-export disable ``` :::caution Unlike the panel, `disable` does not ask for confirmation. It deletes the export stored on the site, the saved GitHub and Cloudflare tokens and the chosen repository, branch and Worker name, and stops an export or deployment that is running. A connection made with **Connect with Cloudflare** is also ended at Cloudflare, as **Disconnect** does. Nothing else on GitHub or Cloudflare is deleted. ::: ### `run` Exports the site and runs the export to the end, printing progress. ```text wp oh-my-etch static-export run [--target-base=] [--output=] [--zip=] [--force] ``` | Option | Meaning | | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--target-base=` | The site address on the static host: a path such as `/docs`, or a full `http(s)` address, without a trailing slash. Leave it out when the site is served from the root of a domain. See [Choose the site address](./export-a-site.mdx#choose-the-site-address). | | `--output=` | Also copy the finished site into this folder. The folder must not exist yet or must be empty, and its parent folder must exist. | | `--zip=` | Also write the finished site as a ZIP file here. The file must not exist yet, and its folder must exist. | | `--force` | Cancel an export that is already running instead of refusing to start. It never empties `--output`. | Examples: ```bash # Export into a new folder. wp oh-my-etch static-export run --output=./static-site # Export for a host that serves the site under /docs, as a ZIP file. wp oh-my-etch static-export run --target-base=/docs --zip=./site.zip ``` At the end it prints `Exported … URLs into … files (…).`, then one warning per problem, then what was left out and what will not work: ```text Left out on purpose (woocommerce): 12 URLs, such as /shop/, /cart/. Will not work on a static host (form): 3 pages, such as /contact/. ``` The words in brackets are the same reasons and notices the panel lists under **Left out of the export** and **Works differently on a static host**; see [Read the summary](./export-a-site.mdx#read-the-summary). With or without `--output` and `--zip`, the export also stays on the site, ready for a deployment or for **Download ZIP** in the panel. ### `status` Shows the status of the current or last export. ```text wp oh-my-etch static-export status [--format=] ``` | Option | Meaning | | ------------------- | ------------------------------------------------------------------------------------------ | | `--format=` | `table` (default) or `json`. JSON prints the whole status, including every listed problem. | ```bash wp oh-my-etch static-export status --format=json ``` ### `cancel` Cancels the running export. ```bash wp oh-my-etch static-export cancel ``` ## Deploy commands Deploy commands publish the last finished export. There is no `--token` option: tokens are never passed on the command line. Connect a token in the panel, or define it in `wp-config.php` (see [Constants](#constants)). There is no sign-in from the command line. `deploy cloudflare` uses a connection made with **Connect with Cloudflare** in the panel, and renews its token by itself. ### `deploy github` :::caution Preview `deploy github` is a preview that is switched off in this version. It then exits with a non-zero status and prints `GitHub Pages deployment is not available in this version yet.`, before it reads any token or checks anything else. It works only while `OME_STATIC_EXPORT_GITHUB_PREVIEW` is defined as `true` in `wp-config.php`; see [Deploy to GitHub Pages (preview)](./deploy-github-pages.mdx) and [Constants](#constants). The rest of this section describes the preview. ::: Commits the export to a GitHub Pages branch, sending only the files the branch does not have yet. Then it switches GitHub Pages on for that branch when it is off and waits for Pages to publish. It prints the address when the commit is on the branch, with a warning when Pages has not published it yet. Nothing on GitHub is ever deleted, and a branch is never force-pushed. ```text wp oh-my-etch static-export deploy github [--repo=] [--branch=] [--overwrite[=]] ``` | Option | Meaning | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--repo=` | The repository, as `owner/repository`. It is remembered, as in the panel. Defaults to the repository chosen before. | | `--branch=` | The branch to publish. It is remembered, as in the panel. Defaults to the branch chosen before, else `gh-pages`. | | `--overwrite=` | Replace the files on a branch whose last commit this site did not make, but only while that last commit is ``: the 40-character commit the refusal printed. The branch's history is kept. Without it, or when the branch has moved since, such a branch is left alone. A bare `--overwrite` without a commit is refused. | Examples: ```bash # First deployment to a repository. wp oh-my-etch static-export deploy github --repo=octo-org/my-site # The branch "site" holds commits from elsewhere: replace its files after checking the commit. wp oh-my-etch static-export deploy github --branch=site --overwrite=0123456789abcdef0123456789abcdef01234567 ``` When the branch holds commits from elsewhere, the command stops and prints the branch's last commit with the advice `Choose another branch with --branch, or run again with --overwrite= to replace the files on that branch; its history is kept.` When the branch already holds exactly this export, it says `The branch … already holds this export, so nothing was committed.` A command-line deployment allows longer requests than the browser, so it can finish deployments with large files that are slow from the panel. ### `deploy cloudflare` Uploads the files Cloudflare does not have yet, publishes the Worker and turns on its `workers.dev` address. It prints the address when the site is live. ```text wp oh-my-etch static-export deploy cloudflare [--name=] [--overwrite] ``` | Option | Meaning | | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--name=` | The Worker to deploy to: 1 to 63 lower-case letters, digits and dashes. It is remembered, as in the panel. Defaults to the name chosen before, else one made from the site's host. | | `--overwrite` | Replace a Worker of that name that this site did not deploy. Without it, such a Worker is left alone and the command stops. | Examples: ```bash wp oh-my-etch static-export deploy cloudflare wp oh-my-etch static-export deploy cloudflare --name=my-site ``` ### `deploy status` Shows the current or last deployment: a Cloudflare row, and the GitHub deployment once GitHub was used. It covers a GitHub deployment also while the GitHub Pages preview is off. ```text wp oh-my-etch static-export deploy status [--format=] ``` | Option | Meaning | | ------------------- | -------------------------------------------------------------------- | | `--format=` | `table` (default) or `json`. In JSON, every item names its provider. | ```bash wp oh-my-etch static-export deploy status --format=json ``` ### `deploy cancel` Cancels the running deployment, on Cloudflare or GitHub, also while the GitHub Pages preview is off. The Worker on Cloudflare and everything on GitHub are left as they are. It exits with `1` when a deployment could not be cancelled and is still running. ```bash wp oh-my-etch static-export deploy cancel ``` Only one export or deployment runs at a time, whether it was started in the panel or from WP-CLI. ## Constants Define these in `wp-config.php`. The three token constants can also be set as environment variables with the same names. | Constant | Meaning | | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `OME_STATIC_EXPORT_GITHUB_PREVIEW` | Turns on the GitHub Pages preview, which is off in this version, when defined as exactly `true`. Only the constant counts: an environment variable does not turn it on. See [Deploy to GitHub Pages (preview)](./deploy-github-pages.mdx). | | `OME_STATIC_EXPORT_GITHUB_TOKEN` | The GitHub token used for deployments with the GitHub Pages preview. It never enters the database, and the panel cannot change it. | | `OME_STATIC_EXPORT_CLOUDFLARE_API_TOKEN` | The Cloudflare API token used for deployments. Same as above. While it is defined, the panel does not offer **Connect with Cloudflare**. | | `OME_STATIC_EXPORT_CLOUDFLARE_ACCOUNT_ID` | The Cloudflare account ID, 32 hexadecimal characters. Needed together with the token constant. | | `OME_STATIC_EXPORT_SECRET_KEY` | The key that encrypts tokens pasted into the panel and the tokens of a Cloudflare sign-in: a random string of at least 32 characters. Without it, the WordPress salts are used. See [The encryption key](./keeping-tokens-safe.mdx#the-encryption-key). | | `OME_STATIC_EXPORT_LOOPBACK_URL` | The address the server uses to fetch its own pages, such as `http://wordpress`, when it cannot reach the site's public address. See [When the site cannot reach itself](./local-sites.mdx#when-the-site-cannot-reach-itself). | | `OME_STATIC_EXPORT_DIR` | An absolute folder path where the site keeps its export, instead of the `ome-static-export` folder inside the uploads folder. | ## Filters These filters are for developers and, like the rest of Static Export, may change while it is in beta. Add them in a small plugin or your theme's `functions.php`. | Filter | Default | Meaning | | ---------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ome_static_export_max_urls` | `50000` | The most addresses one export may collect before it stops with an error. | | `ome_static_export_seed_urls` | WordPress's sitemap entries | The list of absolute addresses the export starts from, for one sitemap page at a time. Return a list of strings to add or remove addresses. | | `ome_static_export_fetch_timeout` | `20` | Seconds to wait for one page or file. | | `ome_static_export_max_response_bytes` | `52428800` (50 MB) | The largest page or file the export accepts, in bytes. | | `ome_static_export_facet_snapshot_budget` | `500` | The most filter combinations one list recorded as Facet Snapshots may need before it counts as over the limit. At most `100000`. | | `ome_static_export_max_facet_snapshots` | `20000` | The most recorded filter results one export may hold. | | `ome_static_export_max_facet_snapshot_bytes` | `314572800` (300 MB) | The most bytes of recorded filter results one export may hold, Composed Datasets included. | | `ome_static_export_max_facet_composed_bytes` | `52428800` (50 MiB) | The most bytes of one list's Composed Dataset. A list over it is recorded as Facet Snapshots. | | `ome_static_export_max_facet_composed_dataset_bytes` | `8388608` (8 MiB) | The most bytes of the main file of one Composed Dataset, its item files not counted. A list over it is recorded as Facet Snapshots. | | `ome_static_export_max_facet_composed_search_bytes` | `8388608` (8 MiB) | The most bytes of the search file of one Composed Dataset; it counts toward the dataset's limit too. A list over it keeps its filters without text search. | | `ome_static_export_composed_language_supported` | `false` on a site with WPML or Polylang, else `true` for the site's own language or none | Whether a list requested in a language can be recorded with Composed Filters. Receives the decision and the request language. | For example, to raise the per-list limit: ```php add_filter( 'ome_static_export_facet_snapshot_budget', static fn (): int => 2000 ); ``` With **All filters**, this limit applies only to lists that are not recorded with [Composed Filters](./what-works.mdx#composed-filters-and-facet-snapshots): the panel records every such list within it with all its filters, and a list over it too, as long as the export can hold it; see [Lists too large for one export](./what-works.mdx#lists-too-large-for-one-export). The export also honours WordPress's own `https_local_ssl_verify` filter when it fetches your pages over HTTPS: by default it does not check the certificate of your own site. --- ## Troubleshooting # Troubleshooting :::caution Beta Static Export is in beta. See [what Beta means](./overview.mdx#what-beta-means). ::: Find the message you see on this page, then apply the fix. Messages are quoted as the panel or WP-CLI shows them; `…` stands for a name, a number or an address that depends on your site. ## Exporting ### "Static Export needs WordPress 6.7 or newer." Update WordPress to 6.7 or newer. ### "Static Export needs pretty permalinks. …" In **Settings → Permalinks**, choose any structure other than **Plain**, save, and export again. ### "Static Export is turned off. …" Switch on **Enable Static Export** in the panel, or run `wp oh-my-etch static-export enable`. When the panel says `Static Export is turned off on this site. Reload the panel.`, it was turned off in another tab or from WP-CLI: reload the page. ### "An export is already running." Another tab or a WP-CLI command started an export. In the panel, continue it with **Continue export** or stop it with **Cancel export**. From WP-CLI, run `wp oh-my-etch static-export cancel`, or start with `--force` to cancel the running export and start a new one. ### "Another export request is still running. Try again in a moment." Two requests reached the site at once, for example from two tabs. Wait a moment and try again. ### Errors under "Folder path" or "Site address on the static host" The field is **Folder path**, under **Served from a folder?** in step 1 of the **ZIP file** destination; the panel opens it when it shows an error. With the GitHub Pages preview, it is **Site address on the static host** in step 2 of **GitHub Pages**. An export from the **Cloudflare** destination has no site address, so it never shows these errors. These messages call the field the target base: | Message | Fix | | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Static Export target base contains unsafe characters or a trailing slash. | Remove the trailing `/`. Between single slashes use only letters, digits, `-`, `.`, `_`, `~` and `%` with two hex digits, and no part that is `.` or `..`. In a full address, use a domain of letters, digits, `-`, `_` and dots (an international domain in its `xn--` form) or an IPv4 address, and a port from 1 to 65535. | | Static Export target base cannot be protocol-relative. | Start the path with a single `/`, not `//`. | | Static Export target base must be empty, root-relative or an absolute http(s) URL. | Enter a path such as `/my-repo`, or a full `https://` address, or leave the field empty. | | Static Export target base must have a host and no user information. | Use a full address with a domain and without `user:password@`. | | Static Export target base must be at most 1024 bytes long. | Use a shorter path or address. | From WP-CLI the same messages start with `Invalid target base:`. ### "The export stopped because the site has more than … URLs to export." The site has more addresses than one export may collect (50,000 by default). Check whether a plugin generates many addresses, for example through a calendar or an archive. A developer can raise the limit with the `ome_static_export_max_urls` [filter](./wp-cli.mdx#filters). ### "The export is paused because of an error." or "The export stopped responding." A request failed or the connection dropped. Click **Continue export** to try again. ### Notes in the Problems table | Note | What to do | | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | Not found on the site. | A link points to a page that does not exist. Fix or remove the link. | | The site answered with HTTP …. | The page fails for anonymous visitors. Open it in a private browser window and fix the error. | | Redirects to another site. | The address redirects away from your site, so it is not exported. | | Redirects without a usable location. / Redirects to itself more than once. | Fix the redirect, for example in a redirect plugin. | | The page is not HTML. | The address returns something other than a page. Usually nothing to do. | | Fetching this URL stopped the export twice, so it was left out. | Rendering the page broke the export twice. Open the page in a private browser window, fix any error, then export again. | | No connection base answered: …. | The server cannot reach its own site. See [When the site cannot reach itself](./local-sites.mdx#when-the-site-cannot-reach-itself). | | WooCommerce page, left out of the static site. | Expected. See [WooCommerce pages](./what-works.mdx#woocommerce-pages). | ### The downloaded site looks unstyled when I open `index.html` A page opened as a file cannot load the stylesheets and scripts it links from the root of the site. The export itself is complete. Serve the folder with a local web server, as described in [Preview the download on your computer](./export-a-site.mdx#preview-the-download-on-your-computer). ### WP-CLI: "The output directory is not empty. …" or "The ZIP file already exists. …" `--output` needs a new or empty folder, and `--zip` a file name that does not exist yet. Choose another one. The export itself finished and stays on the site. ## Recording filters Under **Cloudflare**, **Deploy to Cloudflare** takes the place of **Export site** in the answers below: it exports, records the filters and deploys, and deploys nothing when recording is cancelled, stops or fails. ### "Recording stopped: this export cannot hold more filter results." The lists need more results than one export can hold (20,000 results and 300 MB by default; Composed Datasets count toward the 300 MB). **All filters** records only the pagination of lists recorded as Facet Snapshots whose filter combinations do not fit, but the result pages of each combination only count while recording, so a run can still reach the limit. Choose **Pagination only** under **Filters** and click **Export site** (or **Deploy to Cloudflare**) again. If you need the filters, a developer can raise the limits, see [Filters](./wp-cli.mdx#filters), or show fewer options in the largest filters and export again. ### "Recording stopped: you are no longer signed in. …" Your WordPress session ended. Reload the page, sign in if asked, and click **Export site**. ### "Recording stopped: the site stopped answering. …" Check your connection and that the site is running, then click **Export site**. ### "Recording stopped: the export is no longer available. …" Reload the page to see the state of the export, then export again if it is still there. ### "The export could not add the files the filters need. Continue the export." Click **Continue export** to finish the export, then download the ZIP or deploy. ### "Recording was cancelled." or "Filters not recorded" after a WP-CLI export Click **Export site**: it exports again and records the filters. An export made with WP-CLI never records filters; see [WP-CLI](./wp-cli.mdx). ### A list shows only its first page on the static site Its filters were not recorded, or the export was made with **None** under **Filters**. Check **Filters** in the summary and the reason given under **Filters not recorded**, choose **All filters** or **Pagination only**, then click **Export site** to export and record again. A list that kept pagination only shows its pages, with its filters hidden. See [When filters are not recorded](./what-works.mdx#when-filters-are-not-recorded) and [Lists too large for one export](./what-works.mdx#lists-too-large-for-one-export). ### A Search facet is hidden on the static site Text search works only on a list recorded with Composed Filters, and only when every text input of that list can be served; see [Text search](./what-works.mdx#text-search). The console line of the list says why its search is off; see [Reading the Composed Filters console line](#reading-the-composed-filters-console-line). ### A list kept pagination only although others with more filters kept theirs That list was not recorded with Composed Filters, so it was recorded as Facet Snapshots and was over the limit. To see why, open the browser console of the WordPress admin tab you exported from. During recording the panel writes one line per list there, starting with `[OhMyEtch Static Export] Composed Filters`, which says that the list was recorded with Composed Filters or why not. Send that line with a support request. See [Composed Filters and Facet Snapshots](./what-works.mdx#composed-filters-and-facet-snapshots). ### Reading the Composed Filters console line A list recorded with Composed Filters gets a line such as `[OhMyEtch Static Export] Composed Filters recorded list "shop" on /shop/: 120 items, 14 options, 2 orders, 31 checks`. When the list has a Search facet (free text), the line ends with `, search on (6 checks)`, or with `, search off: / ` and the reason its text search was not recorded. A list that was not composed gets `… Composed Filters not used for list "shop" on /shop/: / `. The detail names the template, control or request concerned. When a list is not composed, it still works, recorded as Facet Snapshots. When its search is off, the list still works with its other filters, and its text inputs stay hidden. Some of the codes: | Code | What it means | What you can do | | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `start/no_recording` | Your site did not name the recording it started. | Export again. If it repeats, send the line with a support request. | | `…/not_started` | The recording of this list was replaced or removed while it ran, for example by an export started in another tab. | Export from one tab only, and export again. | | `basis/optionless_control` | A filter that a visitor can change has no options. | Give the filter its options, or remove it. | | `basis/overwriting_groups` | Two filters of the list set the same thing, for example two author filters, so the second would replace the first. | Merge them into one filter. | | `check/superseded` or `search_check/superseded` | During the check, the page replaced its own requests twice for one state, so that state proves nothing. | Export again. | | `search/duplicate_clause` | Two text inputs of the list search the same field in the same way. | Remove one, or point them at different fields. | | `search/no_clause` | Typing into a text input does not change the list's request. | Check in Etch that the input is bound to this list. | | `search/base_changed` | Typing into a text input changes the list's other settings instead of only narrowing it. | Check the input's query argument against the list's other inputs, such as a fixed hidden input. | | `search/too_many_clauses` | The list's text inputs send more than 10 searches; each row of a Query Bundle counts. | Use fewer text inputs or fewer bundle rows. | | `search/overwriting_clause` | A text input would replace a filter instead of narrowing it: an author name search beside an author filter, or a category or tag text search beside a category or tag filter. | Remove one of the two, or search the terms with a Taxonomy Argument. | | `search/client_error` | The page's filters could not say what a text input sends. | Export again. If it repeats, send the line with a support request. | | `search/request_failed` | A request to your site for the search failed. | Export again. | | `search/no_samples` | A text input's field holds no text the panel could take a sample search from; the detail names the input. | Nothing; the list works without text search. Add text to that field if you need it. | | `search/search_samples` | Your site found no sample text in the field of a text input; the detail names it. | As `search/no_samples`. | | `search/reused_verdict` | The same list on another page already had its search switched off; the detail gives that reason. | Look at the line of the other page. | | `search/not_started` | As `…/not_started` above. | Export from one tab only, and export again. | | `search/search_clause` | A text input searches something the static site cannot, see [Text search](./what-works.mdx#text-search), searches a taxonomy that is not publicly viewable, or the same search is sent twice. | Change the input to one of the settings listed there, make the taxonomy publicly viewable if it should be, or accept that the input stays hidden. | | `search/search_base` | Adding a search would change the list's own query. The detail says how: `search columns` (your site limits WordPress search to other fields than title and excerpt), `sanitize_title` (a plugin changes how slugs are built, so slug search is off), the query variable that would change (for example a theme snippet keyed on `is_search()`, or a category, tag or author restriction the search would replace), or that the loop already searches. | For `search columns` or `sanitize_title`, check the plugin or snippet that filters it. For a query variable, change the snippet or the text input so the search only narrows the list. | | `search/search_meta` | The searched custom field is protected, or an item holds a value in it that is not text. With the detail `author name`: an author of the list has a display name equal to their login, nicename or email address, so the author search is off. | Search another custom field. For `author name`, set a proper display name for that author in **Users**. | | `search/search_too_large` | The search file would be larger than 8 MB, or would take the dataset over its limit. | Search fewer fields, or a developer raises the limit, see [Filters](./wp-cli.mdx#filters). | | `search_check/not_compared` | A text input's search was never compared during the check (the detail names the input), or a planned check compared nothing (the detail names the state). A list with more than eight text inputs can hit this. | Use fewer text inputs on the list, or accept that its search stays hidden. | | `search_check/` | Any other code: a sample search gave a different answer in the browser than on WordPress; `` names what differed. | Send the line with a support request. | ## Deploying, both hosts Under **Cloudflare**, where an answer below says to export the site again, then deploy, clicking **Deploy to Cloudflare** does both. ### "Export the site first: a deployment publishes the last finished export." There is no finished export on the site. [Export the site](./export-a-site.mdx), then deploy. **Deploy to Cloudflare** exports the site itself, so it never says this. ### "An export is running. …" or "Filters are being recorded. …" An export or a recording started with **Export site**, or one found paused when the panel opened, is not finished yet. A deployment would publish an unfinished export, so it waits until the export or the recording has ended. ### "A deployment to … is running. Wait for it to finish or cancel it, then deploy." Wait for the other deployment to finish, or cancel it, then deploy. ### Cloudflare deployments are refused as running, but nothing is deploying This can happen after the [GitHub Pages preview](./deploy-github-pages.mdx) was switched off while a GitHub deployment was still running. The panel no longer shows that deployment, but it still counts as running, so **Deploy to Cloudflare** says `A deployment is already running. Wait for it to finish, or cancel it.` and `deploy cloudflare` prints the same, followed by advice. Run `wp oh-my-etch static-export deploy cancel`, which cancels the GitHub deployment also while the preview is off, then deploy again. Switching Static Export off and on also clears it, but that deletes the stored export and the saved tokens. ### "The export changed or was removed while it was being deployed, so the deployment stopped. …" Export the site again, then deploy. ### "Your session has expired or you may not manage Static Export. …" Reload the page and sign in again as an administrator. ### "This site cannot encrypt the token, so it was not saved. …" `OME_STATIC_EXPORT_SECRET_KEY` is defined but shorter than 32 characters, or the server cannot encrypt. Make the key at least 32 characters long, or put the token in `wp-config.php`. See [The encryption key](./keeping-tokens-safe.mdx#the-encryption-key). ### "The saved token cannot be read" The site's security keys or `OME_STATIC_EXPORT_SECRET_KEY` changed since the token was saved. Enter the token again, or disconnect. ### "This site blocks outbound requests to … (WP_HTTP_BLOCK_EXTERNAL in wp-config.php). …" Add the host named in the message (`api.cloudflare.com`, or `api.github.com` with the GitHub Pages preview) to `WP_ACCESSIBLE_HOSTS` in `wp-config.php`. **Connect with Cloudflare** also needs `dash.cloudflare.com`. When it is blocked, the page in the Cloudflare tab reads **Cloudflare could not be connected** with this message. Add both Cloudflare hosts, for example: ```php define( 'WP_ACCESSIBLE_HOSTS', 'api.cloudflare.com,dash.cloudflare.com' ); ``` Keep any hosts the constant already lists. ### "Deploying through the WordPress proxy needs the PHP cURL extension, …" The site sends requests through a proxy (`WP_PROXY_*` constants) and PHP has no cURL extension. Install the cURL extension, or ask your host to. ### "Could not reach …" The server could not connect to GitHub or Cloudflare. Check the server's internet connection, DNS and firewall, then try again. ### "On a multisite network, a … token set in wp-config.php can only be used by a network administrator." Sign in as a network administrator, or save a token for this site in the panel instead. ### "The deployment stopped responding. Continue it to try again." Click **Continue deployment**. ### "The deployment could not be cancelled and is still running. Try again." Click **Cancel deployment** again. ### "The export has no files, so nothing was deployed. …" or "The export contains a symbolic link …" The stored export is damaged or incomplete. Export the site again, then deploy. ## GitHub Pages ### "GitHub Pages deployment is not available in this version yet." `wp oh-my-etch static-export deploy github` prints this because deploying to GitHub Pages is a preview that is switched off in this version. Export a ZIP file and host it on GitHub Pages yourself, or deploy to Cloudflare. See [Deploy to GitHub Pages (preview)](./deploy-github-pages.mdx). The other messages in this section come from the preview, when it is turned on with `OME_STATIC_EXPORT_GITHUB_PREVIEW`. ### "GitHub did not accept the token (HTTP 401). Enter a valid token." The token is wrong, expired or revoked. Create a new one and click **Replace token**, or update `OME_STATIC_EXPORT_GITHUB_TOKEN`. See [Create the token](./deploy-github-pages.mdx#create-the-token). ### "The GitHub token may not do this in this repository (HTTP 403). …" The token lacks access to the repository or a permission. Give it access to this repository with **Contents: Read and write** and **Pages: Read and write**. ### "GitHub could not find this, or the token has no access to it (HTTP 404). …" Check the owner and the repository name, and that the token's repository access includes this repository. ### "GitHub answered with a redirect …" The repository was probably renamed or transferred. Enter its new owner and name, and click **Save repository**. ### "The GitHub repository … is archived, …" Unarchive the repository in its settings, or choose another repository. ### "The GitHub user of this token cannot push to …" Give the token's user write access to the repository, or choose another repository. ### "The branch … of … already holds commits that were not deployed from this site. …" The branch has content from elsewhere. Choose another branch, or confirm the replacement. In the panel, confirm with **Replace its files and deploy**. From WP-CLI, run again with `--overwrite=` and the commit the message printed. See [When the branch holds commits from elsewhere](./deploy-github-pages.mdx#when-the-branch-holds-commits-from-elsewhere). ### "This export was made to be served at …, but GitHub Pages serves … at …, so its links would not work there. …" Export again with **Site address on the static host** set to the value the message names, then deploy. See [Exported for another address](./deploy-github-pages.mdx#exported-for-another-address). ### "GitHub Pages of … is built by a GitHub Actions workflow, …" In the repository's **Settings → Pages**, choose **Deploy from a branch**, then deploy again. ### "GitHub Pages of … publishes the branch … from the folder …, but this deployment writes the branch …. …" In **Settings → Pages**, choose the branch you deploy to and the folder **/ (root)**, or deploy to the branch Pages already uses. ### "GitHub refused the branch …, which nobody else changed: a branch protection rule or ruleset may forbid this token from pushing to it. …" Allow the push in the branch's protection rules or rulesets, or deploy to another branch. The text after `GitHub says:` is GitHub's own reason. ### "The branch … changed on GitHub while the site was being deployed, so nothing was published. Deploy again." Someone pushed to the branch during the deployment. Deploy again. ### "GitHub stored different content than the export, so nothing was published. …" Deploy again. If it happens again, export the site again first. ### "… but this token may not turn on GitHub Pages. …" (GitHub Pages is not on) The site was committed, but the token has no **Administration** permission. Switch Pages on by hand: see [Switch GitHub Pages on by hand](./deploy-github-pages.mdx#switch-github-pages-on-by-hand). ### "… but GitHub Pages had not built it after 10 minutes. …" (GitHub Pages is still publishing) The deployment worked; GitHub Pages is still building. Check the repository's **Settings → Pages** in a few minutes. ### "… but GitHub Pages could not build the site. GitHub says: …" Read GitHub's reason after `GitHub says:` and check the repository's **Settings → Pages**. ### "GitHub limited requests … times in a row, so the deployment stopped. Try again later." GitHub's rate limit was reached many times in a row. Wait, then deploy again. ### "There was not enough free memory to read which files the branch already holds, so every file is sent again. …" The deployment works, but sends every file. Raise the PHP memory limit so later deployments send only the files that changed. ### "Large files can take longer than a browser request allows to send them; …" Finish the deployment from a terminal with `wp oh-my-etch static-export deploy github`, which allows longer requests. ### "The export has more than 100,000 files; a GitHub Pages deployment holds at most 100,000, …" Leave files out of the export, for example by recording filters for fewer lists, and deploy again. ### "The export is …; a GitHub Pages site may be at most …, so nothing was deployed. …" GitHub Pages sites can be at most 1 GB. Leave files out of the export, for example large media or recorded filters, and export again. ### "… larger than 25 MiB, the most this plugin sends to GitHub as one file; …" Make the named file smaller, or remove it from the site, and export again. ### "The file … cannot be published on GitHub Pages: …" The file's path is too long, has characters Git does not accept, or lies in a `.git` folder. Rename or remove it in WordPress and export again. ## Connecting Cloudflare with a sign-in These are the messages of **Connect with Cloudflare**. Some appear in the panel, others on the page in the Cloudflare tab. ### "Connect with Cloudflare needs HTTPS. …" The site is served over plain `http://`. Serve it over HTTPS, or paste an API token instead under the message; see [Or paste an API token](./deploy-cloudflare.mdx#or-paste-an-api-token). Local sites on `localhost`, `*.localhost`, `*.local`, `*.test`, `127.0.0.1` or a private network address do not need HTTPS. On the `connect.ohmyetch.com` page the same problem reads **This link is not valid** with `This WordPress site does not use HTTPS, so it cannot connect with Cloudflare this way. …` ### "Connect with Cloudflare cannot send you back to this site: …" The site's admin address is not a plain address ending in `/wp-admin/admin-post.php`, often because another plugin changes it. Paste an API token instead. ### "Your browser blocked the new tab. Open Cloudflare here." The browser blocked the pop-up. Click **Open Cloudflare here** in the panel, or allow pop-ups for your site and click **Connect with Cloudflare** again. ### The panel stays on "Waiting for Cloudflare…" Finish the sign-in in the Cloudflare tab, including **Continue to …** on the `connect.ohmyetch.com` page. The panel checks by itself every few seconds, and at once when you come back to its tab. - If you closed the Cloudflare tab, click **Open Cloudflare again**. - To stop, click **Cancel**. This also cancels the sign-in, so finishing it in the Cloudflare tab afterwards connects nothing. - After 10 minutes the panel stops waiting and says `The sign-in was not finished. Select Connect with Cloudflare to try again.` Click **Connect with Cloudflare** to start again. ### "The sign-in was not finished. If Cloudflare or this site showed a message in the other tab, it says why. …" The sign-in ended in the other tab without connecting: you declined on Cloudflare, the link expired, or something failed there. The page in that tab says which. Click **Connect with Cloudflare** to start again. ### "Finishing the connection…" after you clicked Cancel You clicked **Cancel** when the sign-in was already on its way back to the site, so it could no longer be cancelled. The section updates by itself within a minute and then reads **Connected**. Click **Disconnect** if you do not want the connection. ### "A Cloudflare sign-in is being finished on this site. Try again in a moment." Another sign-in, yours in another tab or another administrator's, is being completed right now. Wait a minute and click **Connect with Cloudflare** again. ### "This sign-in link is no longer valid: it expired, was already used, or was started by another user. …" The page in the Cloudflare tab shows this when the sign-in took more than 10 minutes, when the same link was opened twice, when another sign-in was started meanwhile, or when you are signed in to WordPress as a different user than the one who started it. Go back to the panel and click **Connect with Cloudflare** again, in the same browser, signed in as the same administrator. ### "This sign-in is already being finished. …" The same link was opened twice, for example by a double click. The first one is still working. Go back to the panel; it shows the result. ### "This sign-in was cancelled on the site while it was being finished, so nothing was connected. …" While the sign-in was being completed, someone disconnected Cloudflare, pasted an API token or switched Static Export off on the site. That choice was kept and the sign-in was dropped. Start again from the panel if you still want to connect this way. ### "Sign in to WordPress as an administrator and start again from the Static Export panel." The page in the Cloudflare tab (**Sign-in not allowed**) found no administrator signed in to WordPress in this browser. Sign in, then start again from the panel. ### "You declined the request on Cloudflare, so nothing was connected." You clicked deny on Cloudflare. Nothing changed on the site. Click **Connect with Cloudflare** again if you meant to approve. With `Cloudflare did not grant access, so nothing was connected.`, Cloudflare refused for another reason. Start again from the panel. ### "This link is not valid" - On `connect.ohmyetch.com`, with `This page could not continue the connection to Cloudflare. …`: the address was cut or changed, for example when copied by hand. Start again from the panel. - On your own site, with `This is not a valid Cloudflare sign-in link, so nothing was connected. …`: the same, for the address that brings you back to the site. Start again from the panel. ### "Connection ended" The section reads **Connection ended** and `Cloudflare ended this connection: connect again to deploy.`. A deployment or a test can also say `Cloudflare no longer accepts this connection. Connect with Cloudflare again.` Click **Connect with Cloudflare** to connect again. It also shows after the site's security keys or `OME_STATIC_EXPORT_SECRET_KEY` changed, because the saved connection can no longer be read. Otherwise it usually happens when a copy of the site, such as a staging site made from the production database, deploys with the same connection. After connecting again, connect each copy on its own, or use a pasted API token on the copy. See [Connection ended](./deploy-cloudflare.mdx#connection-ended). ### "The Cloudflare connection is being renewed by another request. Try again in a moment." Two requests needed a fresh Cloudflare token at the same time. Wait a few seconds and try again. A running deployment waits and continues by itself. ### "This site is disconnected, but Cloudflare could not be reached: …" The site no longer holds any token. To remove the entry on Cloudflare too, open your profile in the Cloudflare dashboard, go to **Connected Applications** and remove **Oh My Etch**. The same applies to `The token is saved. The earlier sign-in could not be ended at Cloudflare. …` after you pasted an API token over a sign-in, and to `The earlier connection could not be ended at Cloudflare. …` on the page of a new sign-in. ### Oh My Etch is still listed under Connected Applications This is expected after you uninstalled the plugin, or after a disconnect that could not reach Cloudflare. Uninstalling deletes the tokens from the site but does not contact Cloudflare. No token is left that works. Remove **Oh My Etch** under **Connected Applications** in your Cloudflare profile if you want it gone. ## Cloudflare ### "Cloudflare did not accept the API token (HTTP 401). …" or "The Cloudflare API token is …" The token is wrong, expired or deleted. Create a new one and click **Replace token**, or update `OME_STATIC_EXPORT_CLOUDFLARE_API_TOKEN`. See [Create the API token](./deploy-cloudflare.mdx#create-the-api-token). If you connected with **Connect with Cloudflare**, see ["Connection ended"](#connection-ended). ### "The API token may not do this on this account (HTTP 403). …" Check that the token has the **Workers Scripts: Edit** permission for this account and that the account ID is right. If you connected with **Connect with Cloudflare**, disconnect and connect again, and approve the account you deploy to. ### "`OME_STATIC_EXPORT_CLOUDFLARE_ACCOUNT_ID` is missing or is not 32 hexadecimal characters." Define the account ID in `wp-config.php` next to the token constant. You find it on the **Workers & Pages** overview of the Cloudflare dashboard. ### "This Cloudflare account has no workers.dev subdomain yet. …" Open **Workers & Pages** in the Cloudflare dashboard once and choose a subdomain, then deploy again. ### "A Worker named … already exists on this Cloudflare account and was not deployed from this site. …" Choose another **Worker name**, or confirm the replacement with **Replace it and deploy**. From WP-CLI, use `--name` for another name or `--overwrite` to replace it. ### "The export has … files. The Cloudflare Workers Free plan serves at most 20,000 files per Worker, …" A warning: the deployment goes ahead, and Cloudflare refuses it on the Free plan. Upgrade to Workers Paid, or choose **Pagination only** or **None** under **Filters** and deploy again, so the export has fewer files. ### "The export has more than 100,000 files; a Cloudflare Worker holds at most 100,000, …" Leave files out of the export, for example by recording filters for fewer lists, and deploy again. ### "… larger than 25 MiB, the most Cloudflare serves for one file; …" Make the named file smaller, or remove it from the site, and export again. ### "The file … cannot be served by Cloudflare: …" The file's address is too long or has characters an address cannot carry. Rename or remove it in WordPress and export again. ### "The Cloudflare account changed while the site was being deployed, …" The token, the account ID or the sign-in was replaced during the deployment. Deploy again to publish to the account now connected. ### "Cloudflare refused the files of this version (HTTP …)." Cloudflare refused the upload, possibly because of a plan limit. Check the [plan limits](./deploy-cloudflare.mdx#plan-limits). ### "Cloudflare is limiting requests. …" or "Cloudflare failed … times in a row, …" Wait a few minutes, then deploy again. ### An empty Worker appears on the account A first deployment that was cancelled or failed part-way can leave an empty Worker with that name. The next deployment to the same name reuses it. Delete it in the Cloudflare dashboard if you no longer need it.