This project is not covered by Drupal’s security advisory policy.

Delete unpublished entities protects live Drupal content by preventing published nodes and taxonomy terms from being deleted, while allowing unpublished items to be removed.

Features

Delete unpublished entities adds a configurable safeguard for Drupal sites that need to protect published content from accidental deletion.

  • Prevents published nodes from being deleted.
  • Prevents published taxonomy terms from being deleted.
  • Allows unpublished nodes and taxonomy terms to be deleted normally.
  • Hides the delete operation for protected published entities.
  • Removes the delete option from the edit forms of protected published entities.
  • Blocks direct access to the delete form for a published entity and displays an error message.
  • Respects the restriction when using the Views bulk node deletion action, skipping published nodes.
  • Allows the restriction to be enabled or disabled independently of the selected entity types.
  • Allows administrators to choose which content types and taxonomy vocabularies are protected.

This module is useful for editorial websites, publishing platforms, knowledge bases, and other Drupal sites where published content must remain available and should not be removed accidentally. It is especially helpful when editors need to delete or clean up unpublished content without risking the deletion of live content.

Post-Installation

After installing and enabling the module, go to Configuration > Content > Delete unpublished entities, or visit:

/admin/config/content/delete-unpublished-entities

The Administer site configuration permission is required to access the configuration page.

On the configuration page:

  1. Enable or disable the deletion restriction.
  2. Select the content types whose published nodes must not be deleted.
  3. Select the taxonomy vocabularies whose published terms must not be deleted.
  4. Save the configuration.

When the restriction is enabled, it applies to the selected content types and vocabularies. Changes to the configuration apply to subsequent deletion operations. Content types and vocabularies that are not selected retain Drupal's normal deletion behavior.

Additional Requirements

This module requires:

  • Drupal 10 or Drupal 11.
  • The Drupal core Node module.
  • The Drupal core Taxonomy module.

No external libraries or third-party APIs are required.

Supporting this Module

This module is free software distributed under the GNU General Public License, version 2 or later.

You can support the project by reporting issues, suggesting improvements, testing new releases, and contributing patches through the Drupal.org project page.

Community Documentation

For installation and configuration instructions, see the project's README file. The module's configuration page is available at:

/admin/config/content/delete-unpublished-entities

Additional community documentation, video tutorials, and demo sites may be added as they become available.

Supporting organizations: 
Development and maintenance

Project information

Releases