Plugin to Disable all Subsites During Maintenance


Please, can you indicate a plugin to disable or show a message in the subsites saying that the system is under maintenance?

I need to block all subsites of the network.


  • aristath

    Hello again @Andreza, I hope you're well today!

    You don't need a plugin... You can di it pretty simply like this:
    Create a new PHP file in wp-content/mu-plugins and call it under-construction.php
    In that file paste the following:

    function custom_is_login_page() {
        return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'));
    $message = "This site is currently under maintenance. Please try again in a few minutes);
    // Die and return the message if current user is not admin
    if ( ! current_user_can( 'manage_options' ) {
      // Make sure we're not on the login page
      if ( ! custom_is_login_page() ) {
        wp_die( $message );

    This will check the user permissions of the current user. If they are not an admin, they will not be able to access tyour site and only the administrator will be able to see it.

    If you want to remove the protection you can then simply delete this file.

    I hope that helps!