Publishing
Publish a working copy to the live site, install something new, and how the health check protects the site.
Publishing makes the working copy live. It's the only way your changes reach the site.
Publish#
- Save your open files. Only saved changes are published.
- Click Publish in the toolbar. For a theme or plugin that isn't installed yet, the button says Install.
- Read the checks in the dialog.
- Type a Message saying what changed. It names the snapshot in History.
- Click the button at the bottom.
The dialog's title and button depend on the project:
| Project | Dialog | Button | What happens |
|---|---|---|---|
| Not installed | Install name | Install | Installs it without activating it. Nothing runs, and visitors see no change, until you activate it. |
| Installed, active | Publish to live | Publish | The site runs the new version straight away. |
| Installed, not active | Update name | Update | Updates the installed files. Visitors don't see it, and the site doesn't run it, until you activate it. |
With Pro, when the project has a repository you can push to, the dialog adds Then commit to branch on GitHub (or GitLab), and the button becomes Publish and commit. See Commit. Pro
The checks#
The dialog lists:
- How many files changed. With no changes, there's nothing to publish.
- "Every changed file passes the save checks", or each file with an error and its line. Errors block the publish.
- Whether you've previewed the latest changes, with a Preview site link. This is a reminder, not a block.
- A warning if open files have unsaved edits.
- Pro "Built assets match the source files", or "The build is out of date" with a button to build now. A stale build blocks the publish. See Asset builds.
- Pro Whether the branch has commits you haven't pulled.
How the swap works#
Temper copies the working copy next to the installed folder, then swaps it in with two renames, so a visitor never gets half a theme. The version it replaced becomes a snapshot. See Snapshots and rollback.
The health check#
The save checks catch syntax errors, but not a call to a function that doesn't exist. So when you publish code that visitors run (the active theme, its parent, or an active plugin), Temper loads your home page before and after the swap:
- If the page worked before and shows an error after, Temper puts the previous version back at once and tells you the error with its file and line: "Publishing broke the site, so the previous version was put back." Visitors saw the error for well under a second. The broken version is kept as a snapshot, so you can look at it.
- If the site was already broken before the publish, or can't reach itself, nothing is rolled back.
The check request doesn't trigger WordPress's "Your site is experiencing a technical issue" email.
After publishing#
- The toolbar says "Matches the installed version".
- The History tab lists the snapshot, filed as Before "your message".
- A new theme or plugin is installed but not active. Use Activate when you're ready.