---
title: "How to Auto-Delete ZIP Files After Download"
description: Delete each WordPress plugin ZIP from the server automatically once the download finishes, to keep the temp folder clean. Pro.
url: "https://wpfactory.com/docs/auto-delete-zip-after-download/"
updated: "2026-09-27"
category: Pro Features
---

# How to Auto-Delete ZIP Files After Download

To delete ZIP files from your server automatically after each download, use [Download Plugins and Themes in ZIP from Dashboard](https://wpfactory.com/item/download-plugins-and-themes-from-dashboard-wordpress-plugin/) Pro. Go to **WPFactory > Download plugins and Themes**, scroll to **Advanced Settings**, set **Auto Delete ZIP files** to **Yes** and click **Save settings**. Your downloaded copy is not affected.

Once enabled, Download Plugins and Themes removes each ZIP file from the server as soon as the download reaches your browser. This keeps the temporary directory clean and avoids leaving archive copies on disk. Auto-delete is a Pro feature.

## Before you start

- [Download Plugins and Themes](https://wpfactory.com/item/download-plugins-and-themes-from-dashboard-wordpress-plugin/) Pro (this option is Pro only). In the free version the field is shown but disabled.
- An administrator account: the settings page requires the `manage_options` capability to save.

## Turn on auto-delete

1. Go to **WPFactory > Download plugins and Themes** and scroll to **Advanced Settings**.
2. Set **Auto Delete ZIP files** to **Yes**.
3. Click **Save settings**.
4. Download any plugin with its **Download ZIP** link on **Plugins > Installed Plugins**. The file saves in your browser as usual, and the server copy is removed once it has been sent.

## Options reference

| Label | Option key | Default | Free/Pro |
| --- | --- | --- | --- |
| Auto Delete ZIP files | `alg_download_plugins_dashboard_delete_zip` | No | Pro |
| Temporary directory (where the ZIP is built) | `alg_download_plugins_dashboard_temp_dir` | Blank (system temporary directory) | Free |

## How it works

When a download finishes streaming to the browser, the plugin fires the `alg_download_plugins_after_download` action. Pro hooks that action and, if **Auto Delete ZIP files** is Yes, removes the archive it just served from the temporary directory.

**Note:** auto-delete applies to on-demand browser downloads: per-item downloads, the "Download all" tools, and the Pro bulk "Download ZIP" action. It does **not** remove files created by [periodical (scheduled) downloads](https://wpfactory.com/docs/automate-backups-pro/), since those are written to a folder on purpose to be kept as backups.

## When to use it

- Shared or low-disk hosting where leftover ZIP files in the temporary directory add up.
- Sites with many large plugins or themes, where a single "Download all" archive is sizeable.
- Any workflow where you only need the download in the browser and never on the server.

## If ZIP files are still left on the server

- **Check the folder you are looking at.** Scheduled downloads go to **Plugins downloads path** and **Themes downloads path** (by default `wp-content/uploads/plugins-archive` and `themes-archive`), which auto-delete never touches.
- **Check that the download completed.** Deletion runs only after the whole file has been sent. If a download is cancelled or times out partway, the ZIP can stay in the temporary directory until the next download of the same item overwrites it.
- **Confirm Pro is active.** The deletion is done by the Pro plugin. With only the free version active, the setting has no effect.
- **Files created before you enabled it** are not cleaned up retroactively. Delete them once by hand from the temporary directory.

## FAQ

### Can I delete the ZIP files after downloading?

Yes. The ZIP is only a copy built from the plugin or theme folder, so deleting it, on the server or on your computer, does not affect the installed plugin. Auto-delete simply removes the server copy for you.

### What happens if I leave auto-delete off?

The last ZIP of each item stays in the temporary directory. Each file is named after the plugin or theme folder (plus the version, if you append it), or `plugins.zip` and `themes.zip` for "Download all", and is replaced the next time the same ZIP is built, so copies do not pile up endlessly, but they do stay on disk.

### Where are the ZIP files stored before they are deleted?

In the **Temporary directory** set under **Advanced Settings**. Left blank, the plugin uses the system temporary directory shown under the field. See [Advanced Settings: ZIP library, temporary directory and auto delete](https://wpfactory.com/docs/exploring-advanced-settings/).

### Ready to set this up?

Auto-delete is a Pro feature of [Download Plugins and Themes](https://wpfactory.com/item/download-plugins-and-themes-from-dashboard-wordpress-plugin/). If you are still on the free version, upgrading unlocks this along with the rest of the Pro toolkit. [Get Download Plugins and Themes Pro](https://wpfactory.com/item/download-plugins-and-themes-from-dashboard-wordpress-plugin/).

Need a hand? Our team answers every ticket on the [Download Plugins and Themes support forum](https://wpfactory.com/support/item/download-plugins-and-themes-from-dashboard-wordpress-plugin/).

Related articles

- [How to Customize the Download ZIP Link on the Plugins Page](https://wpfactory.com/docs/customize-download-zip-link/)
- [How to Bulk Download Selected Plugins as a ZIP](https://wpfactory.com/docs/bulk-download-selected-plugins/)
- [How to Download a Single Plugin or Theme as a ZIP](https://wpfactory.com/docs/download-single-plugin-or-theme/)
- [Bulk Download Plugins and Adding the Version to the ZIP Name](https://wpfactory.com/docs/bulk-download-plugins-themes/)
- [Download ZIP Link Not Showing on the Plugins or Themes Screen](https://wpfactory.com/docs/download-zip-button-not-showing/)
