You can turn your whole site into plain HTML files, with no PHP and no database behind it. You’ll export it as a zip to a folder on your server, or straight to Cloudflare, then fine-tune what goes into the export and connect your forms to a service that works without a server.
Choose a destination
Open the menu on a theme’s card and choose Export as HTML.
Download zip is the default destination. Mosaic packs everything into a zip file that downloads when the export finishes. Inside, you’ll find all of the site’s assets plus your posts and pages as HTML files, ready to serve from any static host.
To skip the download, choose Folder on this server and enter the exact path. Mosaic sends the files there.
Choose Cloudflare to upload your site straight to a Cloudflare Worker or a Pages project. The steps below use a Worker.
Publish to Cloudflare
On the Cloudflare dashboard, create a new application. The Hello World template is fine, since Mosaic replaces it with your own files.
Rename the Worker, for example, to mosaic, and click Deploy.
Use the quick search in the top left to search for “token”, go to Account API tokens, and create a new token.
Give the token a name, for example, Mosaic HTML export, and select Edit Cloudflare Workers for the permissions. Review the token, then click Create token.
Copy your API token and your account ID and keep them somewhere safe. You’ll need both in the next step.
Back in Mosaic, add your account ID, your API token, and the name of your Worker.
Start the export and wait until it finishes. Then open the URL where your Worker serves the site. It’s live and works just like before.
Fine-tune the export
If you already know your static site’s final address, enter it as the base URL. This gives you a sitemap, an RSS feed, social share images, and tags for search engines.
Limit the export to just what you need. For example, select only pages if you don’t need anything else.
Choose between a folder for each page with an index.html file inside, or the page’s name as the HTML file.
A static site has no server or mail service behind it. When a form has an action, the visitor’s browser sends the submission straight to the receiving service. The Forms option here is only a fallback for forms without an action: it can redirect the visitor or send submissions to a service you configure. Ideally, you set up the action on each form instead.
Keep forms working
Select your form and add an action. Actions that need a server won’t work on a static site, so skip Email, Kit, Mailchimp, MailerLite, and Search. The rest work. This example uses Formspree.
Paste the endpoint of your Formspree form, then save your changes.
Fill in the form on your exported site and submit it. Then open your form’s submissions in Formspree to check that it arrived.
Result
Your site now runs as plain HTML files, wherever you choose to host it. With a base URL set, it keeps its sitemap, RSS feed, and search engine tags, and with a server-free action like Formspree, your forms keep collecting submissions.