Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

From static cache to static publishing

This guide is for administrators who already use the static cache and wonder whether static publishing replaces it, complements it, or is something else. It compares the two and shows how to move a site from one to the…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/guides/from-static-cache-to-static-publishing.md

On this page

From static cache to static publishing

This guide is for administrators who already use the static cache and wonder whether static publishing replaces it, complements it, or is something else. It compares the two and shows how to move a site from one to the other.

Guides · Related: Static cache generator, Static publishing, What static publishing is

What you'll have at the end

A clear choice for each site between the static cache, static publishing or both, and a first static copy made with the crawler you already know.

Two features, one crawler

Both crawl the site as a visitor and write pages to files. They differ in where the files go and who serves them.

Static cacheStatic publishing
PurposeSpeed: the web server answers anonymous visitors from filesA public copy that needs no Exponential at all
Where the files arestatic below the installation, next to the live siteThe target's folder, a git repository, pushed to a host
Who serves themYour web server, with rewrite rules, in front of the live siteGitHub Pages or any static host
Linksunchanged, the site's own addressesrewritten: relative, or below a base path
Files and imagesserved by the live sitecopied into the copy
Search, forms, loginwork: requests that miss the cache reach PHPfall back (search index, form endpoint, hidden)
Cleaningnone needed, same serverdebug output, form tokens and session ids taken out; pages that cannot be cleaned refused
Updateson content publish, the cached files are rewrittenbuild and publish, by hand, on publish (debounced) or on a schedule
Historynoneevery publish a commit and tag; rollback
Started fromSetup > Cache > Static content cache, makestaticcache.phpSetup > Static publishing, exp:static:*

The build of static publishing uses the static cache generator's crawler in an export mode: same link following, same depth (MaxDepth falls back to [CacheSettings] MaxCacheDepth), but without a cookie and with the module views left out.

Which one

  • Keep the static cache when the live site stays public and must keep search, forms, logins or a shop. It makes that site fast; static publishing would take those features away.
  • Use static publishing when the public part can live without a server: a brochure, blog, documentation, a portfolio. The live installation can then stay internal, and the public site costs nothing to host.
  • Use both when the live site stays public for members and shoppers, and a free static copy serves a second audience (a documentation mirror, an archive, a campaign site).

The settings live in the same file, staticcache.ini: [CacheSettings] for the cache, [StaticPublishSettings] and [Target_<id>] for publishing. They do not affect each other.

Moving a site over

  1. Note the depth and page limit your static cache uses; the target's MaxDepth and MaxPages take the same role.
  2. Make a target for the same siteaccess in Setup > Static publishing > New target.
  3. Build with --dry-run and read the report: pages the static cache served happily may be refused here, because they start a session or carry a form token. Exclude them (ExcludePaths[]) or change them.
  4. Preview the copy (exp:static:serve) and check the links (exp:static:diff --check-links).
  5. Publish, point the domain at the host (custom domains and DNS).
  6. When the copy serves the public, the static cache of that siteaccess is no longer needed; switch it off when you are sure nothing still reaches the live site's public address.

Next step

Make a free website in 15 minutes.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x