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
- Sign in as an administrator and open Admin > Sites.
- On the site's row, click the download button (Export static site). Any site can be exported, active or not.
- In Site address, enter the address the copy will have, for example
https://www.example.com, orhttp://localhost:8081for 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) andsitemap.xml. The links between pages do not depend on it. - Click Export ZIP. A large site takes a little while; the browser then downloads
<site>-static-<date>.zip.
What is in the ZIP
| File | What it is |
|---|---|
index.html | The home page. |
<path>/index.html | Every other page: /about is about/index.html, so the address /about keeps working on any web server. |
c/<collection>/page/2/index.html | Page 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.html | The site's "page not found" page. Most static hosts show it by themselves; Apache needs one line (see below). |
sitemap.xml, robots.txt | For search engines, with the Site address. robots.txt blocks search engines when Settings > SEO > Allow search engines is off. |
EXPORT-INFO.txt | When 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.htmlis used automatically. - Cloudflare Pages: create a project with Direct Upload and upload the folder or the ZIP.
404.htmlis used automatically. - GitHub Pages: push the files to a repository and publish it. It must be served at a root: a
<user>.github.iorepository 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.htmlas the index document and404.htmlas the error document. - Shared hosting (cPanel, Plesk, FTP): upload the files to the domain's web folder (often
public_html/). On Apache, add the.htaccessline 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.
- Stop Apache in the XAMPP Control Panel.
- Move everything in
C:\xampp\htdocs(XAMPP's dashboard andindex.php) into a backup folder outside it. - Unzip the export's contents into
C:\xampp\htdocs, so thatC:\xampp\htdocs\index.htmlandC:\xampp\htdocs\themes\exist. - 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
- Unzip the export's contents into a folder, for example
C:\xampp\htdocs\mysite(index.htmldirectly inside it). - Open
C:\xampp\apache\conf\extra\httpd-vhosts.confin a text editor and add at the end:
Use forward slashes in the paths, even on Windows.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> - Restart Apache in the XAMPP Control Panel.
- Open
http://localhost:8081/.http://localhost/still showshtdocsas before.
With a name of its own (mysite.test)
- Unzip the export into
C:\xampp\htdocs\mysiteas above. - Open Notepad as administrator, open
C:\Windows\System32\drivers\etc\hostsand add the line:127.0.0.1 mysite.test - In
C:\xampp\apache\conf\extra\httpd-vhosts.conf, add these two virtual hosts at the end. The first keepshttp://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> - 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 withAPP_URL=http://localhost:3000only works on your own computer. - A copy served over
https://needsAPP_URLonhttps://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
- Change the site on the Carnival3 server (pages are exported only once published).
- Export again with the same Site address.
- Replace the files on the host: delete the old ones first, so pages you removed disappear too. On Apache, put the
.htaccessfile back.
Troubleshooting
| What you see | Why, and what to do |
|---|---|
| Pages without styles or images; menu links lead nowhere | Opened 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 address | The .htaccess line is missing, or AllowOverride is off for the folder. |
| A page is missing from the copy | It 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 error | The 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 update | The 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.