Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Configuration Language Lock 1.0.2 Minor update available for module config_language_lock (1.0.2). Release: Canvas Override 1.0.1 Minor update available for module canvas_override (1.0.1). Release: Media Remote Image 8.x-1.2 Minor update available for module media_entity_remote_image (8.x-1.2). Release: IDNA Convert Service (punycode) 2.0.4 Minor update available for module idna (2.0.4). Release: Bootstrap Cloud 7.1.3 Minor update available for theme bootstrap_cloud (7.1.3). Release: Token Browser 1.0.2 Minor update available for module token_browser (1.0.2). Release: Varbase Project 11.0.8 Minor update available for module varbase_project (11.0.8). Release: Media Remote Image 2.0.0-beta1 First beta version released for module media_entity_remote_image (2.0.0-beta1). Usage Milestone: Term CSV Export Import Module term_csv_export_import crossed 1,000 active installs. Security Coverage: Module Scout Module module_scout now has official Drupal security advisory coverage.

Lock Entity

3 sites No security coverage
View on drupal.org

Lock Entity protects individual entities of any type from accidental deletion by marking them as protected. This allows administrators to prevent the removal of critical content such as nodes, taxonomy terms, users, and media.

Lock Entity prevents deletion of any entity type by marking individual entities as protected. Inspired by Prevent Homepage Deletion, it extends that concept beyond the homepage to any entity type: nodes, taxonomy terms, users, media, and more.

Lock Entity prevents deletion of any entity type by marking individual entities as protected. Administrators can lock nodes, taxonomy terms, users, media, or any other entity, preventing accidental deletion of critical content.

Features

  • Lock any entity type (nodes, taxonomy terms, users, media, and more)
  • Optional per-lock reason shown to users who attempt deletion
  • Prevents unpublishing of locked published entities (closes an indirect workaround)
  • Admin UI at /admin/config/system/lock-entity
  • Locks are stored in configuration and export cleanly with drush cex

Post-Installation

After enabling the module, navigate to Administration > Configuration > System > Lock Entity (/admin/config/system/lock-entity).

Use the Add a new lock section to select an entity type, enter the entity ID, and optionally provide a human-readable reason for the lock. The reason is shown to users who attempt to delete the entity.

To remove a lock, click Remove next to the entry in the locked entities table. Until removed, no user, including administrators, can delete the locked entity.

The lock can only be removed by a user with the Administer site configuration permission, via /admin/config/system/lock-entity.

Additional Requirements

No additional modules or libraries are required. Drupal core 10 or 11 is sufficient.

None required.

Similar projects

  • Prevent Homepage Deletion — the original inspiration for this module. Locks only the homepage node. Lock Entity generalizes this to any entity type and any entity ID.
  • Config Readonly — locks configuration rather than content entities.
  • Node Keep — similar concept but limited to nodes only. Lock Entity covers all entity types.

Supporting this Module

Patches, bug reports, and feature requests are welcome via the issue queue.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jun 2026
Latest release
4 weeks ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.0-rc1 Pre-release 10–11 Aug 13, 2026
1.0.x-dev Dev 10–11 Jun 10, 2026