Skip to content
StaticScope
Overview
Get StaticScope

Recover a failed publish

Tell a failed build from a failed deploy, find the log, roll back if needed and re-run only the publish.

Troubleshooting Updated 21 November 2026 6 min read

A failed build and a failed publish look similar from the outside: the site did not change. They need different responses. Rebuilding when the deploy failed can make the situation worse, and republishing when the build failed sends the same broken files.

Decide which one you have before you press anything.

Distinguish a failed build from a failed deploy

SignalFailed buildFailed deploy
Overview hero“Your last build didn’t finish” or preparing the files failedPreview is ready; the add-on reports the error
Build panelLast build is old, or the prepared files are missing or older than the copyBuild is current and the prepared files exist
Add-on screenNo publish error, because no publish started“The last publish, X ago, didn’t work: …” or an error on the card
Activity logStops during finding, copying or preparingReaches “Publishing”, then stops
Live siteUnchangedUnchanged or partly changed

The last row matters. S3 uploads assets before pages, so a deploy that dies halfway can leave new images with old HTML. Your server in releases mode only switches current when every file has arrived, so it stays on the old release. GitHub sends one atomic push, so a failed push changes nothing.

Where the log is

StaticScope → Activity log has every step, newest first. The Overview has a Build log panel with the last 500 lines while a run is happening. The add-on screen keeps the last publish error and time. The host has its own deploy log, which is the only place to see what happened after the files arrived.

wp staticscope status
wp staticscope diagnostics
wp staticscope github status
wp staticscope s3 status
wp staticscope server status

Read the last successful line before the failure. “Files prepared” followed by a publish error is a deploy problem. A stop before “Files prepared” is a build problem.

If the build failed

Fix the cause, then build again. Do not publish: the prepared files are missing or incomplete, and the publish will be refused or will send an old copy.

  • A timeout or memory error means the host limit is too low for the site. Raise it, or build with WP-CLI where the limit can be set.
  • A connection error means the server cannot reach WordPress. Check basic auth, DNS and firewall rules.
  • A write error means uploads is not writable or the disk is full.
  • No pages found means detection was turned off or the permalink structure is not supported.

If the deploy failed

The prepared files are still good. Retry the publish first, without rebuilding. Most failures are transient: a rate limit, a dropped connection, a host API blip or a PHP time limit on a large first upload.

Open the publisher from the Overview or from StaticScope → Publish site, then use its publish button: Publish site now for S3 and Your server, Publish last preview for GitHub when it is offered. If the publisher does not manage its own screen, the Overview offers Publish directly. From WP-CLI:

wp staticscope deploy
wp staticscope github publish production --yes
wp staticscope s3 publish
wp staticscope server publish

Do not clear the prepared files before retrying. They are what you are trying to send. If a publish was interrupted, S3 and Your server skip files already uploaded, so the retry is quicker than the first run.

Rolling back

Roll back when the publish succeeded but the result is wrong, or when a partial deploy left a mix of old and new files. Rolling back restores service. It does not fix the cause.

GitHub

On the environment card, select Undo last publish. It restores the tree from before the last publish as a new commit. It refuses if the branch moved since, and it only goes back one publish. You can also revert the commit on GitHub by hand, but the next StaticScope publish replaces the branch again, so fix the build before then.

Your server

Select Roll back last publish on the Publish site screen. In releases mode the previous release folder is switched back to. In direct mode the replaced files are restored from the backups kept for this purpose, if that option was on. The button appears only when a rollback is available.

S3 storage

There is no rollback button. The add-on deletes old files only after all uploads succeed, so a failed publish usually leaves the previous pages in place. If a publish completed with bad content, you have three options: restore the previous version from bucket versioning if it is enabled, restore the objects from your own backup, or build the previous content again and publish it. Do not delete the bucket to “start clean”; that takes the site down.

Your own host

Cloudflare, Netlify and similar hosts keep deploy history. Use their dashboard to redeploy the previous successful deploy. That is faster than a StaticScope rollback and does not depend on the branch. It also bypasses StaticScope, so the next publish will overwrite it.

Clear the right caches

After a rollback or a retry, purge the host or CDN cache and try a private window. A stale HTML page can hide a successful deploy for hours.

StaticScope’s own caches are under Caches: Pages found, Copy cache, Copied files, Prepared files and Upload record. Clearing them changes the next build or upload, never the live site. Two rules:

  • Keep Prepared files if you intend to republish the same build.
  • Clearing the Upload record makes the next publish upload every file again. It is safe, but slow. Do it when you suspect the record is wrong, not as a first step.

Re-run only the publish

Once the cause is fixed, publish the same build and check three conditions: the add-on says it succeeded, the last publish time moved, and the live URL serves the new content. If the add-on succeeds but the site does not change, the problem is now at the host: wrong branch, failed deploy, cache or a domain pointed elsewhere.

What not to do

  • Don’t rebuild immediately after a deploy failure. You lose the exact files you were trying to send and may include unrelated changes.
  • Don’t delete the bucket, repository or server folder. Restoring a site is much harder than retrying a publish.
  • Don’t edit the branch or bucket by hand while a publish is running. The next push overwrites the branch, and the upload record will not know about files you add to the bucket.
  • Don’t rotate the token or keys mid-publish. Finish or cancel first, then replace credentials.
  • Don’t restore the WordPress database to fix a deploy. The deploy does not read the database; the prepared files are already on disk.
  • Don’t run two publishes at once. The lock will refuse the second one, and the messages get confusing.

Next