Paragraphs Health
Paragraph Health is a toolkit for managing the Paragraphs module, helping site builders and developers monitor, audit, and clean up related database data. It provides a UI and Drush commands to identify and remove orphaned paragraphs, clean up unused revision tables, and optimize storage.
Paragraph Health is an administration toolkit that helps site builders and developers monitor, audit and clean up the data generated by the Paragraphs module.
When a site relies heavily on Paragraphs, the underlying database tables (paragraphs_item, paragraphs_item_revision, paragraph__*, paragraph_revision__*) can grow very fast, accumulate orphan rows and leave behind obsolete revision tables. Paragraph Health surfaces all of that in a single administration UI and provides safe cleanup tools — both through the web interface and through Drush.
Key features
- Storage overview report. A dashboard under Reports → Paragraph Health that shows the total database size, how much of it is used by paragraphs, the count of paragraph items and revisions, and a per-type breakdown of every paragraph field table with row counts and size.
- Historical charts. A cron collector snapshots the size of each paragraph table over time and renders growth charts (Chart.js) so you can spot tables that are exploding.
- Orphan paragraphs detection. Lists paragraphs whose
parent_id/parent_typeis missing or points to a node that no longer exists. Includes filtering by bundle, pagination, single deletion and batch “delete all” with progress feedback. - Orphan revision tables cleanup. Detects unused
paragraph_r__HASHtables that were left behind by removed fields or bundles, shows their size and row count, and lets you drop them safely after confirmation. - InnoDB table optimizer. Batch UI to run
ALTER TABLE … ENGINE = InnoDBon selected paragraph tables to reclaim space. - Paragraph Type usage report. Shows where each paragraph type is being used across content.
- Field Explorer. Given a node and one of its revisions, renders the value of every paragraph field of that revision — useful to audit revision content.
- Queue processor. Web UI + Drush command to process the
entity_reference_revisions_orphan_purgerqueue with progress feedback, which is required before dropping orphan revision tables. - CSV export of the storage report.
- Security-focused cleanup. All destructive SQL is guarded by a strict whitelist of paragraph-related table names and audit-logged with the acting user ID.
Drush commands
drush paragraphs_health:drop-r-tables— scan and drop orphanparagraph_r__*tables.drush paragraphs-health:delete-paragraphs-orphans— delete every orphan paragraph, optionally filtered by--type.drush paragraphs-health:delete-paragraphs-orphans-random— delete a random subset, useful for large sites.drush paragraphs-health:paragraphs-orphan-count— count orphan paragraphs by type.drush paragraphs-health-queue-processor:run <em>queue_name</em>— process a queue with progress output.drush paragraphs_health:queue-size— report queue table size and per-queue item counts.
When to use it
- Your database is growing much faster than the content on the site would suggest.
- You suspect there are orphan paragraphs from deleted nodes, failed migrations, or aborted content operations.
- You’ve changed or removed paragraph fields/bundles and want to remove the leftover revision tables.
- You need visibility into which paragraph types and fields are the heaviest in storage.
Requirements
- Drupal 10 or 11.
- Paragraphs module.
- Database: MySQL / MariaDB is fully supported. PostgreSQL is partially supported for size reports; SQLite has limited support.
Permissions
All administration screens and Drush commands are guarded by the administer site configuration permission. Always run a database backup before executing destructive operations.