# Lock the Admin Email on Subsites

> Makes the Administration Email Address field on each site's General Settings read-only for site admins, so network notices keep reaching the right person.

- Type: PHP
- Runs: Admin only
- Category: [Multisite](https://wpide.com/library/category/multisite/)
- Tags: site-admins, email, settings
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/ms-lock-site-admin-email/

## Code

```php
if ( ! is_multisite() ) {
    return;
}

add_filter( 'pre_update_option_new_admin_email', function ( $value, $old_value ) {
    return is_super_admin() ? $value : get_option( 'admin_email' );
}, 10, 2 );

add_action( 'admin_footer-options-general.php', function () {
    if ( is_super_admin() ) {
        return;
    }
    ?>
<script>
(function () {
    var field = document.getElementById('new_admin_email');
    if (field) { field.readOnly = true; field.insertAdjacentHTML('afterend', '<p class="description">Managed by the network administrator.</p>'); }
})();
</script>
    <?php
} );
```

## Notes

Super admins can still change it here or from Network Admin > Sites > Edit > Settings.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Lock the Admin Email on Subsites" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
