New Lock Entity Module Protects Selected Drupal Entities from Deletion

Promotional graphic introducing the "Lock Entity Module" for Drupal. The image details how the module adds per-entity locks to prevent the deletion or unpublishing of nodes, taxonomy terms, users, and media, and outlines its main administrative and configuration features.

New deletion controls are available through Lock Entity, a contributed Drupal module that protects selected entities by marking them as locked. Drupal.org lists the project with a 1.0.x development version updated on 10 June 2026 at 09:47 UTC.

The module is intended for cases where specific records should remain available even to users with broad administrative access. It supports nodes, taxonomy terms, users, media, and other entity types. The project extends the idea behind Prevent Homepage Deletion, which focuses on protecting the homepage node.

Administrators can manage locks from /admin/config/system/lock-entity. The interface allows users with the Administer site configuration permission to choose an entity type, enter an entity ID, and optionally provide a human-readable reason. Drupal.org states that the reason is shown to users who attempt to delete the locked entity.

Lock Entity also prevents locked published entities from being unpublished, closing an indirect workaround noted on the project page. Locks are stored in the configuration and can be exported with drush cex. The project page states that no additional modules or libraries are required, and that Drupal core 10 or 11 is sufficient.

The project was created by Raymond Kolen on 10 June 2026 and lists DICTU as a supporting organisation. Drupal.org notes that the project is not covered by Drupal’s security advisory policy. Site owners should evaluate that status before production use.

Disclosure: This content is produced with the assistance of AI.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Upcoming Events