The Disable User 1 module provides a simple solution to disable the user with ID 1 in Drupal. This module checks for a configuration setting in the settings.php file to determine whether to disable user 1. When enabled and configured appropriately, it ensures that user 1 is logged out upon accessing any page, thus preventing access to the site with the administrator account.
You can enable the module on production environment by adding the following:
$config['disable_user_1.settings']['disable_user_1'] = TRUE;
Sponsored and developed by:
Supporting organizations:
Project information
218 sites report using this module
- Created by m.abdulqader on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.



