Temper
Menu

Save checks

What Temper checks before it saves a file or publishes, and what each check catches.

On this page

Every file is checked before it's saved to the working copy, whether you save it, a starter creates it, or an AI changes it. A file with errors isn't saved, and each error points at its line. Warnings don't stop the save.

The same checks run again on every changed file when you publish. A publish with errors doesn't start.

Pro A pull from GitHub or GitLab brings files in even when they fail the checks, so you can fix them here, and lists them. They block publishing until they're fixed.

What's checked#

FileErrorsWarnings
.phpPHP syntax, with a full parse (the same check as php -l, without running a command)
.jsonInvalid JSON
theme.jsonNot an object; no "version": 2 or 3; settings or styles that isn't an object; an entry in customTemplates or templateParts without a nameTop-level keys WordPress doesn't know
styles/*.json (style variations)The same checks as theme.json, except versionTop-level keys WordPress doesn't know
block.jsonNo name like my-theme/hero (lowercase, one slash); no title
.html templates and partsBlock comments that don't open and close in order; a closing comment with no opening one; a block that's never closed; attributes that aren't valid JSON
.css and .scssUnbalanced braces
style.css in a themeIt no longer has a Theme Name: header
The main plugin fileIt no longer has a Plugin Name: header
patterns/*.php in a themeNo Slug: header, so WordPress skips the pattern
Any fileLarger than 2 MB

The theme.json shape checks apply to themes. In a plugin, theme.json and styles/ are checked as plain JSON.

While you type#

With Check files while typing on (in Settings › Appearance), the editor runs the checks a moment after you stop typing and marks problems on their lines before you save.

What the checks don't catch#

The checks look at syntax, not behaviour. A call to a function that doesn't exist, or a class that's missing, passes. That's what the health check on publish is for, and why the preview runs your working copy on the real site.

Checking from an AI assistant Pro#

AI assistants connected over MCP get the same checks on every write. They can also run them without writing, with the validate_file tool. See the MCP tool reference.