To delete ZIP files from your server automatically after each download, use Download Plugins and Themes in ZIP from Dashboard 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 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_optionscapability to save.
Turn on auto-delete #
- Go to WPFactory > Download plugins and Themes and scroll to Advanced Settings.
- Set Auto Delete ZIP files to Yes.
- Click Save settings.
- 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, 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-archiveandthemes-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.
Ready to set this up? #
Auto-delete is a Pro feature of Download Plugins and Themes. 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.
Need a hand? Our team answers every ticket on the Download Plugins and Themes support forum.