Skip to content

Zipfile

Introduction

The Zipfile deployment method exports a publication as a downloadable zip archive instead of deploying it to a server, bucket, repository, or hosting provider.

Use this method when you want to inspect the generated static site, move it manually, keep an archive, or upload it with another tool.

Zipfile is useful for:

  • reviewing the full generated output before deploying it elsewhere;
  • manually uploading a static site to a host that Staatic does not deploy to directly;
  • keeping a portable archive of a publication;
  • handing the static site to another operator or deployment pipeline.

How Zipfile Deployment Works

Zipfile does not run Staatic’s normal deployment tasks. Staatic still crawls and builds the publication, but it does not synchronize files to a deployment target.

The archive is generated when you download it from the WordPress admin. It is streamed from the publication results and resources on demand; Staatic does not create and store a separate zip archive during publication.

How to Access the Downloadable Zipfile

  • Visit the Publications Overview page.
  • Hover over the relevant publication, and click on the Download action link.

The downloaded filename uses the publication identifier, for example publication-abcdef.zip.

The Download action works for every publication, whichever deployment method it used, so you can also use it to check what Staatic deployed elsewhere.

What the Archive Contains

The archive holds every file of the publication, with each URL stored as a file path. For a Publish Changes publication in Staatic Premium, that is the complete site, not just the changes.

Published URL File in the archive
https://example.com/ index.html
https://example.com/about/ about/index.html
https://example.com/wp-content/uploads/logo.png wp-content/uploads/logo.png

If the Destination URL contains a path, such as https://example.com/site/, that path is left out. Upload the contents of the archive to the directory that serves the Destination URL.

Redirects and the 404 Page

Zipfile does not generate server configuration, so a redirected URL in the archive usually shows a blank page. Additional redirects are the exception, because they are stored as pages with a meta refresh. Set up the other redirects on the host that serves the files.

The 404 page is included as well. With the default Page Not Found Path, it is 404_not_found/index.html. Point your host’s custom error page to that file.

If your host runs Apache or Nginx, Staatic can write that configuration for you. Publish with the Local Directory method and Generate Apache Configuration or Generate Nginx Configuration enabled, then download that publication: it includes the .htaccess or nginx_rules.conf file. Likewise, the download of a publication deployed to Netlify includes its netlify.toml.

Preparation

No deployment target needs to be prepared before using this method. Make sure the WordPress server can spend enough time serving the download request for the size of the publication.

Configuration

To configure the Zipfile Deployment Method:

  1. Log in to your WordPress admin dashboard.
  2. Navigate to Staatic > Settings.
  3. Select the Deployment tab.
  4. In the deployment method dropdown, choose Zipfile.
  5. Click Save Changes.

Zipfile has no additional deployment settings.

Troubleshooting

The most common Zipfile issues happen during download, not during publication.

“The link you followed has expired”

Download links are tied to your login session and expire within a day. Reload the Publications Overview page and click Download again instead of reusing a copied or bookmarked link.

Timeouts or “This site can’t be reached”

If you experience timeout errors or receive a “This site can’t be reached” message when trying to download the zipfile, the issue is usually caused by server, proxy, or PHP timeout limits. Large publications can take time to stream because the archive is assembled during the admin download request.

Solution:

  • Increase timeout settings: Adjust PHP, webserver, or reverse-proxy timeout settings to allow more time for the download request.
  • Use a deployment target instead: If downloads remain unreliable for large sites, consider Local Directory or another deployment method so Staatic writes files directly to a target instead of streaming a zip through the admin request.