Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: MCP Sentinel 2.23.1 Minor update available for module mcp_sentinel (2.23.1). Release: Audit Chain 1.9.1 Minor update available for module audit_chain (1.9.1). Release: Menu Autopilot 1.4.1 Minor update available for module menu_autopilot (1.4.1). Release: GraphQL Compose Codegen 1.4.1 Minor update available for module graphql_compose_codegen (1.4.1). Release: Field Guard 1.3.1 Minor update available for module field_guard (1.3.1). Release: Webshare 2.0.1 Minor update available for module webshare (2.0.1). Release: Navigation + 2.3.10 Minor update available for module navigation_plus (2.3.10). Release: Edit + 2.3.4 Minor update available for module edit_plus (2.3.4). Module Revived: Flag for Someone Else 1.0.2 Module flag_fse updated after 9 months of inactivity (1.0.2). Security Coverage: smart 404 Module smart_404 now has official Drupal security advisory coverage.

Prevent page deletion

5,537 sites Security covered Drupal 9–11
View on drupal.org

This module protects your site's homepage, and optionally other designated pages, from being accidentally deleted or unpublished. It does this by adding a permission that controls who can perform these actions, ensuring critical pages remain accessible. The module hides delete buttons and prevents bulk actions for unauthorized users.

Synopsis

This module adds a permission 'delete homepage node'. Users with this permission can delete or unpublish the node that is defined as frontpage in the system settings, if other permissions allow them to. Users without this permission cannot. The main goals is to prevent deletion or depublication, not to grant users the permission to do so. So if other permissions prevent them from deleting a node, granting them this permission will not change that.

In version 3 of the module also the 404 and 403 pages are protected if they are defined in the settings. And there is a custom setting that allows you to add specific other URL's that are protected the same way.

Users who cannot delete this page will not see the delete-button on the nodes, and also this option will not be available on the administer content view. The "Published" checkbox on the edit-form will also be hidden. When the bulk-action for deletion or depublication is used a message will be shown that this operation is not permitted.

Usage

- Install with composer composer require 'drupal/prevent_homepage_deletion:^3.0'
- Enable the module
- Find the new permission to delete the homepage
- Grand it to users with care
(if the user also has the 'bypass node access'-permission, that will overrule the working of this module)
- If you want to protect extra nodes, go to "Configuration" > "System" > "Prevent page deletion" and enter one path per line to protect it

  • Node keep Module provides a checkbox on page level to protect pages

Depends on

Dependencies of the latest stable release

  • node Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Oct 2024
Latest release
4 months ago
Releases (12 mo)
1 ▼ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
3.0.2 Stable 9–11 May 7, 2026
3.0.1 Stable 9–11 Oct 10, 2024
3.0.0 Stable 9–11 Oct 9, 2024