Download the PHP package automattic/maintenance-mode-wp without Composer

On this page you can find all versions of the php package automattic/maintenance-mode-wp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package maintenance-mode-wp

Maintenance Mode

Stable tag: 0.3.2
Requires at least: 6.4
Tested up to: 6.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: maintenance-mode, maintenance
Contributors: wpcomvip, automattic, benoitchantre, emrikol, philipjohn, GaryJ

Shut down your site for a little while and do some maintenance on it!

Description

Easily provide a holding maintenance page, including with a custom template, to site visitors.

Custom Template

To add a custom template and messaging:

You can also use the vip_maintenance_mode_template_args filter to adjust the file name and location of the custom template within your theme.

For instance, if you want it to live at wp-content/themes/my-theme/plugin-templates/maintenance-mode-alt.php, then add code like:

add_filter(
    'vip_maintenance_mode_template_args',
    function( $args ) {
        $args['slug'] = 'plugin-templates/maintenance-mode';
        $args['name'] = 'alt';

        return $args;
    }
);

This also allows the third array key to be used to pass in custom arguments to the template.

Additional Configurations

Using filters and conditionals, you can customize the behavior of the Maintenance Mode plugin based on your needs. These options rely on the plugin being installed as described above.

Selectively Load Maintenance Mode

Configure Maintenance Mode to only display for a specific network site. Code similar to this example must be added to the vip-config/vip-config.php file:

$site_name = $_SERVER['SERVER_NAME'];
$lockdown = false;

if ( false !== strpos( $site_name, 'url-to-enable-maintentance-mode' ) ) {
    // Set lockdown
    $lockdown = true;
}
// Set maintenance plugin
define( 'VIP_MAINTENANCE_MODE', $lockdown );

Enable WordPress REST API

Configure Maintenance Mode to keep the WordPress REST API enabled even though the rest of the site is not accessible. Note that this code should be added to a file located within the client-mu-plugins directory:

// Generally allow API access
add_filter( 'vip_maintenance_mode_restrict_rest_api', '__return_false' );

You can also choose to enable the REST API only in more narrow use-cases:

add_filter( 'vip_maintenance_mode_restrict_rest_api', 'x_mm_allow_api' );

function x_mm_allow_api( $default ) {
    if ( my_check() ) { 
        return false;
    }

    return true;
}

Installation

  1. Add the plugin to the /plugins directory of an application's GitHub repository.
  2. Define the VIP_MAINTENANCE_MODE constant as true in vip-config/vip-config.php.
  3. Activate the plugin in the WordPress Admin dashboard Plugins screen.

Screenshots

On Twenty Twenty-Five:

On Twenty Twenty-Four:

On Twenty Twenty-Three:

On Twenty Twenty-Two:

On Twenty Twenty-One:

On Twenty Twenty:

On Twenty Nineteen:

On Twenty Seventeen:

Changelog

See the changelog.


All versions of maintenance-mode-wp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
composer/installers Version ^2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package automattic/maintenance-mode-wp contains the following files

Loading the files please wait ...