Preview
See your working copy on the real site, just for you, in the editor's preview pane or in its own tab.
On this page
The preview shows the front end of your site with the working copy in place of the installed theme or plugin. Only you see it. Visitors, other users and wp-admin keep getting the live version, and preview responses are sent with no-cache headers so a cache or CDN doesn't keep them.
The preview shows saved files. Save first to see a change.
Two ways to preview#
- The preview pane. Click the eye icon in the toolbar ("Show a live preview of the open file"). The pane opens beside the editor and reloads after every save (and, with Pro, every build).
- View site. Click View site in the toolbar to open the site in a new tab with your working copy in place. Browse it like a visitor. The admin bar shows "Previewing name (working copy)", with Exit preview and Back to Temper.
The preview pane#
| Control | What it does |
|---|---|
| File / Site | For a template, template part, pattern or block: File shows that piece on its own, Site shows a whole page. Shown only for files that can render on their own. |
| Phone, tablet, desktop | Width: phone is 390px, tablet 820px, desktop as wide as the pane. |
| Zoom | Fit to pane, or a fixed percentage. |
| Layout | Move the preview beside or below the editor. |
| Reload | Reloads the preview. |
| Open in a new tab | Opens the same page in a new tab. |
Drag the divider to resize the pane, or focus it and use the arrow keys. Double-click it to reset.
What page it shows#
The pane picks a page that shows the open file:
| Open file | Page |
|---|---|
single*.html or singular*.html template | Your latest post |
page*.html, or a custom template from theme.json | Your latest page |
archive, category, tag, taxonomy, author or date template | A category archive |
search*.html | A search for "the" |
404.html | A page that doesn't exist |
| Anything else | The home page |
With File, a template or template part renders on its own, a pattern renders inside a plain main area, and a block renders with its default settings. In classic themes, these pieces render on a plain page that still loads the theme's styles and scripts.
If you browse to another page in the pane, it remembers that page for the file.
Themes#
You can preview any installed theme, not only the active one.
- The active theme: only its files change, so your customizer settings and Site Editor edits still apply.
- Another theme: the whole theme switches for your requests only, the way the Customizer previews themes. A child theme keeps its live parent. If the parent isn't installed, the preview can't run.
Plugins#
A theme can be swapped after plugins load, but a plugin can't. So the first time you preview a plugin, Temper adds a small must-use plugin, wp-content/mu-plugins/temper-plugin-preview.php. It loads the plugin's working copy in place of the installed copy (or for the first time, if the plugin isn't installed or active) only for requests that carry a signed preview token:
- In the preview pane, the token is in the page address and works for 2 hours.
- In a View site tab, it's a cookie that works for 12 hours.
The token is tied to your login session, so it does nothing in another browser or after you sign out. wp-admin, AJAX, REST and cron requests always run the installed copy, so a broken working copy can't lock you out.
Temper removes the must-use plugin when you deactivate Temper.
Note
A plugin that's network-activated on multisite can't be previewed.
PHP errors#
When the working copy throws a PHP error, the preview shows "The working copy stopped with a PHP error" with the file and line, instead of WordPress's critical error screen. Only your preview is affected; visitors still see the live site.
If the error is a missing Composer package, the preview says so. With Pro, install the packages from the Build tab. See Composer packages.
After an AI assistant changes files Pro#
Previewing runs the working copy's PHP on your server, signed in as you. So when an AI assistant connected over MCP changes the working copy, Temper holds the preview until you've looked at the changes:
- The preview pane shows "AI tools changed this working copy" and a button, I've reviewed them, show the preview. The changes are listed in the Changes tab.
- A View site tab shows Review the AI changes first, with Review in the editor and I've reviewed them, preview anyway.
- While a theme's preview is held, the site shows the live theme with a note: "Preview of name paused: review the AI changes in Temper".
Once you choose to preview, the hold lifts until the AI changes something again. See AI assistants over MCP.
Previews and publishing#
The publish dialog reminds you when you haven't previewed the latest changes, with a Preview site link. It doesn't stop you publishing.