Download the PHP package mfd/delete-hidden without Composer
On this page you can find all versions of the php package mfd/delete-hidden. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mfd/delete-hidden
More information about mfd/delete-hidden
Files in mfd/delete-hidden
Package delete-hidden
Short Description Soft-deletes hidden tt_content records older than N days, including recursive b13/container children.
License GPL-2.0-or-later
Informations about the package delete-hidden
delete_hidden
TYPO3 extension (v13.4+) that soft-deletes hidden tt_content records older than a configurable number of days, including their recursive b13/container children.
How it works
- FinderService queries
tt_contentfor records wherehidden = 1,t3ver_wsid = 0, andtstampis older than the given threshold. Pages withtx_delete_hidden_exclude = 1are skipped. - CleanupService enforces a safety cap (default 500) and delegates all deletions to TYPO3's
DataHandler— no direct SQL. AnyDataHandlererror aborts the run immediately. - CleanupCommand exposes the service as a Symfony Console command.
CLI usage
Options
| Option | Default | Description |
|---|---|---|
--days |
90 |
Minimum age in days for a record to be a candidate |
--dry-run |
— | List candidates without performing any deletions |
--page |
0 (all pages) |
Restrict to a page subtree by UID |
--limit |
500 |
Safety cap — aborts before any deletion when exceeded |
Exit codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Validation error, safety cap exceeded, or DataHandler error |
Page exclusion
Set tx_delete_hidden_exclude = 1 on a page to exclude all its content from cleanup.
Installation
Then activate the extension in the TYPO3 backend under Admin Tools > Extensions or via CLI:
Scheduler task
The extension registers a TYPO3 Scheduler task named "Delete Hidden Content Elements".
- Navigate to System > Scheduler in the TYPO3 backend
- Add a new task and select Delete Hidden Content Elements from the class dropdown
- Configure the fields:
- Days — minimum age in days for a record to be a candidate (default: 90)
- Limit — maximum records per run (default: 500)
- Set frequency and save
The Scheduler task always executes (no dry-run mode). If the candidate count exceeds the limit, only the first N records are processed; the rest are handled in subsequent runs.
Running tests
Tests require the project's Composer dependencies to be installed (the vendor/ directory at the repository root).
Test files are located in Tests/Unit/ and Tests/Functional/.
Requirements
- TYPO3 13.4+
- PHP 8.2+
- b13/container (optional) — required only if the host project uses container elements