Temper
Menu

Storage and uninstall

Where Temper keeps working copies, snapshots and settings, how to protect the folder on nginx, and what uninstalling removes.

On this page

The storage folder#

Temper keeps everything it makes in wp-content/temper, or in the folder set by TEMPER_STORAGE_DIR:

Text
wp-content/temper/
  index.php             blocks directory listing
  .htaccess             Apache: refuse every request
  data-<random>/
    drafts/<theme>/     a theme's working copy
    drafts/.plugins/<plugin>/   a plugin's working copy
    snapshots/<project>/<id>.zip   the versions publishes replaced
    snapshots/<project>/<id>.php   each snapshot's details
    state/<project>.php            each project's state: changes, Git sync, builds
    cache/              file hashes, so unchanged files aren't read again

<random> is 32 hexadecimal characters, made the first time Temper runs and stored in the temper_storage_key option.

Working copies hold PHP nobody has reviewed yet, so nothing in this folder is meant to be reached by address:

  • Previews load a working copy's CSS, scripts, images and fonts through WordPress (/wp-json/temper/v1/asset/…), with a link signed for you and your login session. Nothing in the storage folder is served directly.
  • State and snapshot details are .php files that start with <?php exit; ?>, so requesting one returns nothing.
  • Snapshots are zip files, so old versions can't run.
  • PHP warnings from a working copy show its path as [working copy]/…, not the real folder.

Apache#

Temper's .htaccess refuses every request to wp-content/temper. Nothing else is needed.

nginx#

nginx ignores .htaccess and runs any PHP file under the web root. Add this to the site's server block and reload nginx. For WordPress in a subfolder, put that path first.

nginx
location ^~ /wp-content/temper/ { deny all; }

^~ wins over regex locations such as location ~ \.php$, so where you put it doesn't matter. Previews keep working.

Site Health check#

Tools › Site Health runs Temper storage is private. It places a small PHP file and a text file in storage and requests them from your own site:

  • Critical: PHP runs from working copies. Add the nginx rule above, or keep storage outside the web root.
  • Recommended: files are served, but PHP doesn't run.

Temper's screens show the same warning, checked at most once a day. Click Hide for 30 days to dismiss it.

Keep storage outside the web root#

Define TEMPER_STORAGE_DIR in wp-config.php with an absolute path the web server can write, ideally outside the web root:

PHP
define( 'TEMPER_STORAGE_DIR', '/var/lib/temper/example.com' );

Temper keeps its data-<random> folder inside it. Temper doesn't move existing data for you: move wp-content/temper/data-<random> into the new folder, keeping its name. Site Health reminds you until you do.

Settings and other data#

WhereWhat
temper_settings optionSettings, including the encrypted AI key and, with Pro, GitHub and GitLab connections
temper_mcp_keys optionMCP keys, as hashes, with who created them and when they were last used
temper_log optionThe last 200 activity entries, shown in History
temper_preview_secret, temper_preview_hold optionsPlugin preview signing, and previews held for review
User meta temper_prefs, temper_theme, temper_project, temper_open_projects, temper_pinned_projectsEach person's editor settings, and the projects they have open and pinned
wp-content/mu-plugins/temper-plugin-preview.phpThe plugin preview helper, added the first time you preview a plugin
temper_pro_license option ProThe encrypted licence key and the server's last signed answer

Unsaved edits stay in your browser's local storage until you save.

Deactivating#

Deactivating Temper removes the plugin preview helper from wp-content/mu-plugins. Everything else stays.

Uninstalling Temper#

Deleting Temper from the Plugins screen removes its settings, MCP keys, activity log, preview data, temporary data and update cache, every person's Temper preferences and open projects, and the plugin preview helper. On multisite, it does this for every site.

Working copies and snapshots are kept, with the option that names their folder, because they can hold unpublished work that exists nowhere else. Reinstalling finds them again.

To delete them too, add this to wp-config.php before you delete the plugin:

PHP
define( 'TEMPER_UNINSTALL_FILES', true );

Then Temper also deletes the data-<random> folder and its options.

If Temper Pro is installed, uninstalling the free plugin leaves the shared data alone, because Pro uses it.

Uninstalling Temper Pro Pro#

Deleting Temper Pro removes the licence, the GitHub and GitLab connections, and Pro's caches and scheduled check. It removes Temper's own data too, as above, unless the separate free Temper plugin is installed, since a site that switched to free Temper keeps using it. Working copies and snapshots follow the same TEMPER_UNINSTALL_FILES rule. Repository links stay in each project's state, so reinstalling Pro picks them up.

Uninstalling doesn't free the licence's site slot. Deactivate the licence in Settings › Licence first, or remove the site from your account afterwards.