Deleted folders and files wait in the Plathix Trash, where you can restore them. The Trash tab sets how long they wait and what happens to a folder’s files when the folder goes to Trash. Trash is always on and cannot be switched off.
When you need this
- Mistakes noticed late. Set a longer retention, up to 180 days, so an administrator can still restore a folder deleted by mistake.
- Folders whose files should leave the library with them. Turn on Delete files with folder. The files go to Trash with the folder and come back if you restore it.
- Folders whose files must stay in use. Keep Delete files with folder off. Deleting a folder then never takes its files out of the Media Library.
How to set the retention period
- Open Plathix → Settings → Trash.
- Under Trash retention, enter a number from 1 to 180.
- Click Save Settings. The badge “✓ Saved!” confirms the save.
The description reads “How many days files stay in the Trash folder before they are permanently deleted (1–180). Overrides the WordPress default without editing wp-config.” The field is a number followed by “days”. The default is 30. The browser accepts only 1 to 180, and the server also clamps any other value to that range. An empty field keeps the saved value.
The one value applies to folders and to files, although the description mentions files only. There is no “keep forever” value.
When expired items are removed. Plathix runs the cleanup as a background job once every 24 hours. The first run is 24 hours after activation. Background jobs run on WP-Cron and also when someone loads an admin page. With WP-Cron disabled and no system cron, cleanup runs only when someone visits wp-admin. If the job is missing, Plathix schedules it again on an admin page load, within a day. Deactivating the plugin removes the job, and reactivating schedules it again.
Each run removes items that have been in Trash longer than the retention. A run handles at most 100 folders per folder type and 100 files. The oldest folders go first, and the rest wait for the next run. A removed folder is deleted permanently. Files still assigned to it lose the folder and appear in Uncategorized.
When a file goes to Trash in any way, Plathix records the time itself and clears the WordPress trash date. The WordPress 30-day deletion therefore does not remove the file early, and the file follows the Plathix retention.
How to choose what happens to a folder’s files
- Open Plathix → Settings → Trash.
- Under Delete files with folder, check or clear Move attached files to Trash together with the folder.
- Click Save Settings.
The description reads “When a folder is moved to Trash, also move its attached files to the WordPress Trash. When off, files are unassigned from the folder and appear in Uncategorized — restoring the folder does not bring them back.” The default is off.
| Off (default) | On | |
|---|---|---|
| Folder goes to Trash | Files are unassigned and appear in Uncategorized | Files go to the WordPress Trash with the folder |
| Folder is restored | Folder comes back empty | Files still in Trash return to the folder |
| Retention expires | Only the folder is removed | Files are removed too |
When you move a folder without subfolders to Trash, the dialog reminds you: “Files won’t be deleted — depending on your Trash settings, they either move with the folder or become unassigned.”
How to restore or permanently delete a folder
In Free, only administrators (Plathix level Full) can move folders to Trash, restore them or delete them permanently, and only they see the trashed folder tiles. Editors can trash and restore files.
- Go to Media → Library.
- In the folder tree, click Trash. Trashed folders appear as tiles above the files.
- To bring a folder back, click Restore (the arrow icon) on its tile.
- To remove a folder for good, click Delete permanently (the bin icon) on its tile.
- Confirm “Delete this folder permanently? This cannot be undone.”
Restore returns the folder to its saved parent and position. There is no confirmation and no success message. If the parent was deleted or is itself in Trash, the folder goes to the root, also without a message. Subfolders trashed with it come back. Subfolders that stayed in the tree do not move back under it.
Tip: if you created a new folder with the same name in the same place while the original was in Trash, rename the new folder before you restore the original, so the two folders are easy to tell apart.
Delete permanently removes the folder and its subfolders. Files are not deleted.
What ends up in Trash:
- Folders moved with Move to Trash from the folder menu, or with Select folders → Move folders to Trash, with or without their subfolders. System folders cannot be trashed. Dragging a folder onto the Trash node is not supported.
- Files moved with the Plathix Move to Trash button or dragged onto the Trash node.
- The Trash node counts every attachment in the WordPress trash, not only those trashed through Plathix.
Example
Suppose your blog uses the Blog & Content tree, and Brand › Icons holds icon-cart.svg and icon-search.svg. Trash retention is 30 days and Delete files with folder is off. You work as an administrator.
- Open Plathix → Settings → Trash, enter 60 under Trash retention, check Move attached files to Trash together with the folder and click Save Settings.
- Go to Media → Library, open the menu of Icons and click Move to Trash.
- Click Move folder and subfolders to Trash.
Result: the Icons tile would appear in Trash, and both icons would be in the WordPress Trash. A restore within 60 days would bring Brand › Icons back under Brand with both icons. Without a restore, the daily cleanup would remove the folder and both files after 60 days.
What we tested
Limits
- Plathix has no Empty Trash for folders, and no bulk restore or bulk delete for folders. In list view, WordPress’s own Empty Trash button permanently deletes all trashed files.
- Files can be restored or deleted in bulk from the list view, with the bulk actions Restore and Delete permanently.
- Native WordPress Delete permanently buttons bypass the Plathix Trash when
MEDIA_TRASHis off. EMPTY_TRASH_DAYS = 0in wp-config makes WordPress delete files at once. Plathix does not override it.- With WP-Cron disabled and no system cron, cleanup waits for the next visit to wp-admin.
- A run removes at most 100 folders per folder type and 100 files. Larger backlogs take several days.
- Folder Trash uses the WordPress REST API. If a security plugin limits REST API requests, allow the requests of Plathix.
In short
Trash is always on. Trash retention sets one period, from 1 to 180 days with a default of 30, for folders and for files. Delete files with folder decides whether a trashed folder takes its files to the WordPress Trash or leaves them in Uncategorized. A daily background job removes expired items, up to 100 folders and 100 files per run. Restore returns a folder to its saved place; permanent delete removes only folders, never files.