How it fits together

You keep editing on the Carnival3 server. When the site is ready, Export static site crawls it the way a visitor who is not signed in sees it and saves every page, plus every file those pages use, in one ZIP. The files in the ZIP need no Bun, no database and no Carnival3: any web server that serves plain files can host them.

  • Exported: published content only. That includes the home page and its sections, pages from Admin > Pages (also those in no menu), collection lists and items, products, widgets and collection embeds. Theme CSS, JS and images, widget files, uploaded images and files named in CSS are exported too.
  • Not part of a static site: the admin, sign-in and registration, statistics, maintenance mode and the page cache.
  • Still uses the server: the contact form sends its messages to the Carnival3 server (see The contact form).
  • Changes: a static copy does not update itself. Edit on the server, then export and upload again.

1. Export the ZIP

  1. Sign in as an administrator and open Admin > Sites.
  2. On the site's row, click the download button (Export static site). Any site can be exported, active or not.
  3. In Site address, enter the address the copy will have, for example https://www.example.com, or http://localhost:8081 for a copy on your own computer. It is used for the absolute links a page needs: the canonical address, sharing tags (og:url, og:image) and sitemap.xml. The links between pages do not depend on it.
  4. Click Export ZIP. A large site takes a little while; the browser then downloads <site>-static-<date>.zip.

What is in the ZIP

FileWhat it is
index.htmlThe home page.
<path>/index.htmlEvery other page: /about is about/index.html, so the address /about keeps working on any web server.
c/<collection>/page/2/index.htmlPage 2 of a list. On the server it is ?page=2; static hosts ignore the part after ?, so these links are rewritten.
themes/, widgets/, modules/, uploads/The files the pages use, at the same paths as on the server.
404.htmlThe site's "page not found" page. Most static hosts show it by themselves; Apache needs one line (see below).
sitemap.xml, robots.txtFor search engines, with the Site address. robots.txt blocks search engines when Settings > SEO > Allow search engines is off.
EXPORT-INFO.txtWhen and what was exported, and any links that did not lead to a page (left out).

2. Why it needs a web server

Pages link to their files and to each other from the root of the address: /themes/starter/css/style.css, /about. Opened by double-clicking index.html, the browser reads the page from disk (file://) and looks for those files at the root of the drive. The page then shows without styles or images, and the menu links fail. Served by a web server, the same links work.

For the same reason the site must be at the root of its address: https://example.com/ or https://www.example.com/, or a subdomain such as https://site.example.com/. A subfolder (https://example.com/mysite/) does not work.

Look at it on your computer

Unzip the file, then start a small web server inside the unzipped folder:

bunx serve .                  # prints the address, e.g. http://localhost:3000
python -m http.server 8080    # then open http://localhost:8080

When Carnival3 itself runs on port 3000, bunx serve picks another port and shows it.

3. Upload to a host

Upload the contents of the ZIP (not the ZIP file, and not a folder around the files) to the root of the address. index.html must end up at the top.

  • Netlify: drag the unzipped folder onto Sites > Deploy manually. 404.html is used automatically.
  • Cloudflare Pages: create a project with Direct Upload and upload the folder or the ZIP. 404.html is used automatically.
  • GitHub Pages: push the files to a repository and publish it. It must be served at a root: a <user>.github.io repository or a custom domain, not a project page at /<repository>/.
  • Amazon S3 (or a compatible store): upload the files, turn on static website hosting with index.html as the index document and 404.html as the error document.
  • Shared hosting (cPanel, Plesk, FTP): upload the files to the domain's web folder (often public_html/). On Apache, add the .htaccess line from The 404 page on Apache.

4. Run it on XAMPP (Apache)

XAMPP includes Apache, which serves the export as it is. Apache turns /about into /about/index.html by itself: no rewrite rules are needed. There are two ways to give the site the root of an address.

Option A: the whole htdocs folder

Good for a quick look when XAMPP is used for nothing else.

  1. Stop Apache in the XAMPP Control Panel.
  2. Move everything in C:\xampp\htdocs (XAMPP's dashboard and index.php) into a backup folder outside it.
  3. Unzip the export's contents into C:\xampp\htdocs, so that C:\xampp\htdocs\index.html and C:\xampp\htdocs\themes\ exist.
  4. Start Apache and open http://localhost/.

Option B: a virtual host (recommended)

A virtual host gives the site an address of its own, so other projects in htdocs keep working. Use a port of its own (simplest), or a name of its own.

With a port of its own

  1. Unzip the export's contents into a folder, for example C:\xampp\htdocs\mysite (index.html directly inside it).
  2. Open C:\xampp\apache\conf\extra\httpd-vhosts.conf in a text editor and add at the end:
    Listen 8081
    <VirtualHost *:8081>
        DocumentRoot "C:/xampp/htdocs/mysite"
        <Directory "C:/xampp/htdocs/mysite">
            Require all granted
            AllowOverride All
        </Directory>
        ErrorLog "logs/mysite-error.log"
        CustomLog "logs/mysite-access.log" common
    </VirtualHost>
    Use forward slashes in the paths, even on Windows.
  3. Restart Apache in the XAMPP Control Panel.
  4. Open http://localhost:8081/. http://localhost/ still shows htdocs as before.

With a name of its own (mysite.test)

  1. Unzip the export into C:\xampp\htdocs\mysite as above.
  2. Open Notepad as administrator, open C:\Windows\System32\drivers\etc\hosts and add the line:
    127.0.0.1   mysite.test
  3. In C:\xampp\apache\conf\extra\httpd-vhosts.conf, add these two virtual hosts at the end. The first keeps http://localhost/ working: once name-based virtual hosts exist, Apache sends unknown names to the first one in the file.
    <VirtualHost *:80>
        ServerName localhost
        DocumentRoot "C:/xampp/htdocs"
    </VirtualHost>
    
    <VirtualHost *:80>
        ServerName mysite.test
        DocumentRoot "C:/xampp/htdocs/mysite"
        <Directory "C:/xampp/htdocs/mysite">
            Require all granted
            AllowOverride All
        </Directory>
    </VirtualHost>
  4. Restart Apache and open http://mysite.test/.

Use .test (reserved for local use), not .dev or .local: browsers force HTTPS on .dev, and .local is used by other software on many networks. Export with the matching Site address (http://localhost:8081 or http://mysite.test) so the canonical and sharing links match.

XAMPP's httpd.conf already includes conf/extra/httpd-vhosts.conf. If the virtual host is ignored, check that the line Include conf/extra/httpd-vhosts.conf in C:\xampp\apache\conf\httpd.conf is not commented out with #. If Apache does not start, the Control Panel's Logs > Apache (error.log) names the line it rejected; port 80 may also be taken by another program (IIS, Skype), in which case use the port option.

The 404 page on Apache

Apache does not use 404.html by itself. Create a file named .htaccess in the site's folder (next to index.html) containing:

ErrorDocument 404 /404.html

It needs AllowOverride All (in the virtual hosts above; XAMPP's htdocs allows it too). Without it, missing addresses show Apache's plain "Not Found" page. The file is not in the ZIP, so add it again after unzipping a new export.

The contact form

The Contact form widget keeps sending its messages to the Carnival3 server (APP_URL in .env), naming the exported site, so they go to that site's contact email. For it to work:

  • The Carnival3 server must be online and reachable from the visitor's browser at APP_URL. A copy on a public host with APP_URL=http://localhost:3000 only works on your own computer.
  • A copy served over https:// needs APP_URL on https:// too: browsers block requests from a secure page to an insecure address.
  • Email must be set up on the server (Settings > Email), as for the live site.

Set APP_URL before exporting: the export writes it into the pages.

Updating the copy

  1. Change the site on the Carnival3 server (pages are exported only once published).
  2. Export again with the same Site address.
  3. Replace the files on the host: delete the old ones first, so pages you removed disappear too. On Apache, put the .htaccess file back.

Troubleshooting

What you seeWhy, and what to do
Pages without styles or images; menu links lead nowhereOpened from disk (file://) or served from a subfolder. Use a web server, with the site at the root of its address.
The home page works, other pages give "Not Found"The files were uploaded inside an extra folder, or only index.html was uploaded. Upload all the ZIP's contents to the root.
Apache's plain "Not Found" page for a wrong addressThe .htaccess line is missing, or AllowOverride is off for the folder.
A page is missing from the copyIt is a draft, or nothing links to it. Publish it, or link to it; EXPORT-INFO.txt lists links that did not give a page.
The contact form shows an errorThe Carnival3 server cannot be reached at APP_URL, the copy is on https:// and APP_URL is not, or email is not set up on the server.
Old content after an updateThe browser or the host's cache. Reload with Ctrl+F5; on a CDN host, wait or purge its cache.

To run the whole CMS on a server instead, see the Deployment Guide or Deploy on Render. The export itself is described in How to create a site.