Publish a site
Take the files in your editor live, read the publish popover at every stage, and know what to do when one looks stuck.
On this page
Publishing takes the files in your editor right now, builds them on a fresh server, and switches your live address over to that server. Until you publish, everything you changed exists only in the preview.
Where Publish lives
The Publish button sits at the top right of the editor next to Share, with a rocket icon. Clicking it opens a popover headed Publish Site, anchored under the button.
The button is disabled while the project is still loading and while the comment tool is on, so leave commenting before you publish. See Comments.
Opening a project with ?publish=1 on the end of its URL opens the popover and starts the publish for you, as soon as the project and its files have loaded.
What the popover shows before you publish
Under the heading you get the current state of the site.
| Row | Before the first publish | After |
|---|---|---|
| Preview | Not shown | A screenshot of the published site |
| Subdomain | Greyed out | The live host, with an open in new tab arrow and a pencil that jumps to the Domain panel |
| Custom Domain | An Add a custom domain link | The primary domain, with the same two buttons |
| Last Published | Never |
How long ago it was |
| Published By | Not shown | The avatar and first name of whoever published, or not shown when a deploy hook URL started the last publish |
The Custom Domain row shows the site's primary domain, however many domains it has. While none of them is connected yet, it shows the first domain you added instead, greyed out. The open in new tab arrow only appears once the domain is connected and the site is published, and the Add a custom domain link only while the site has no domain at all or its domains are paused.
The Publish button is at the bottom of the popover.
What a publish does
Pressing Publish first waits for any save still running, such as the files of a chat message that just finished or a restore, then saves anything that only exists in the running preview as a Preview sync entry in Backups. Files open in the File Explorer are never sent, because they are read only copies of your saved code. If a save is still running after two minutes, the publish stops with Your latest changes are still being saved, so nothing was published. Please try again in a moment! The rows are then replaced by a progress list.
Steps are grouped into three sections, each with a done counter such as 2 / 4. A step is a grey circle while pending, a spinner while it runs, and a green tick when it is done.
| Section | Steps |
|---|---|
| Setup | Provisioning server |
| Build | Creating build machine, Starting build machine, Compiling application, Uploading to storage |
| Deploy | Creating production server, Downloading application, Waiting for application to be ready, Switching traffic |
View in Logs at the top right of the list opens the Logs tab on its Publish Logs sub-tab, where the raw build output streams. See Logs.
The first publish is the slow one
On a first publish, Provisioning server does real work. It creates the site's server, allocates its addresses, and issues the certificate for your .modulify.website address. That is why the first publish takes noticeably longer than the rest.
On every publish after that there is nothing left to provision, so the step completes immediately and carries a fast forward icon instead of a tick. Build and Deploy run in full every time.
Publishing again
Each publish builds onto a new production server, waits for that server to pass a health check, and only then switches traffic and retires the old one. The version you published last keeps serving visitors for the whole run, including when the publish fails partway through.
Only one publish runs per site. Pressing Publish while one is in flight attaches you to the run already going rather than starting a second. A deploy hook called during a run starts nothing either, and does not queue a publish for later.
When it finishes
You get a Site published toast reading Site was published successfully. and a sound. If you were away from the tab you also get a tab badge and a browser notification titled <your site> is published, with the body Your site is live. Click here to get back to it. Both alerts can be switched off in Your account.
The site is live on its free address straight away. See Your free web address.
Stopping a publish
A Stop button appears under Publish while one is running. Stopping leaves the currently live version exactly where it is.
Stop is accepted right up to the traffic switch. After that you get a Stop failed toast reading This publish is already going live and can no longer be stopped! and the publish finishes anyway. A stop that lands reads Publish cancelled, The publish was stopped.
You can also ask chat to stop a publish that is running, for example stop the publish. The same cut-off applies.
If it looks stuck
Closing the popover stops nothing. It closes on its own when you click into the preview or move to another tab, and reopening it restores the live progress.
If the server has not acknowledged your publish within ten seconds, the header changes from Progress to Reconnecting, confirming status, and Modulify asks the server what actually happened rather than guessing. A publish that genuinely never arrived is sent once more. If that fails too you get Publish did not start, Your publish never reached the server. Please try publishing again!
A build that stops responding is closed out for you rather than hanging. The run is recorded as failed with The publish stopped responding and was cleaned up. Please try publishing again!, and no publish is left open beyond 90 minutes.
When a publish fails
The progress list turns into a red Publish failed panel carrying the tail of the build output and three buttons, View logs, Copy logs and Fix with AI. Publish history covers that panel and the record of every past publish.
Three failures happen before the build starts and arrive as toasts instead.
Your session is not ready to publish. Please refresh and try again!means the page lost its signed in state. Reload and press Publish again.This site is locked because it exceeds your plan limits. Upgrade your plan or add an extra site to publish it!means the workspace is over its site allowance. See Limits and quotas.Your site code could not be reached on GitHub, so nothing was published. Please try again in a moment!means your site's code could not be reached on GitHub when the publish started, so the publish stopped before building. The version already live keeps serving. Unlike the two above, this one is recorded as a failed publish in Publish history, and the progress list readsSomething went wrong while publishing your site. Please try again!
For a site whose code lives in your own GitHub, pressing Publish also checks whether the publish branch holds changes made on GitHub since the last publish that the preview does not already have. If it does, nothing starts. The publish panel shows a warning instead and its button turns into Publish anyway, because the publish replaces those changes. See The publish branch.
Who can publish
Any member of the workspace the project belongs to can publish it. There is no separate publish permission, unlike domains, which need Manage domains. See Members and roles.
In the dashboard, a project's three dots menu carries Open Published Project and Copy Published App Link. Both stay disabled until the site has been published, with the tooltip This project has not been published yet.
Ask chat to publish
You do not have to press the button yourself. Ask chat to publish in plain words, for example publish my site or push it live, and it starts the publish and tells you it has begun.
It is the same publish either way. Chat runs what the button runs, on any site whether it is live already, has never been published, or has been taken offline, and the run is recorded under your name in Publish history exactly like one you started yourself.
For a site whose code lives in your own GitHub, chat checks the same thing the Publish button does. When the publish branch holds changes made on GitHub since the last publish that the preview does not already have, it asks you before replacing them and publishes only if you agree.
Chat publishes only when that message asks it to. It will not publish after making edits, to check its own work, or because the site looks finished. See Chat with your site.
Publish from outside Modulify
The third way to start a publish needs no one in the editor. Add a deploy hook to the site, and a plain GET request to its secret URL starts the same publish the button does, from a CI pipeline, a script or a scheduled job.
A hook follows the same rules as the button. It publishes the latest saved version, it can make a site's first publish, and a call while a publish is running is logged as Already building instead of starting a second one. A locked site refuses it with the same message as above. Every call is kept in the hook's call log until you remove it or clear the log.
Next
- Publish history records every publish and why one failed.
- Deploy hooks start a publish from anywhere with a secret URL.
- Connect a custom domain puts the site on an address you own.
- Your free web address is where a published site first appears, and the preview origin is what a third party OAuth provider needs while you are still building.