Maintenance Mode

Usage

On the VIP Go platform

1. Commit the plugin to your repo. Add it to the Plugins directory.
2. Add the VIP_MAINTENANCE_MODE constant to vip-config/vip-config.php or in your theme and set to true.

 define( 'VIP_MAINTENANCE_MODE', true );

3. Load the plugin in client-mu-plugins/plugin-loader.php

wpcom_vip_load_plugin( 'maintenance-mode' );

If you are using this plugin on a multisite, you may need to include a conditional check to select only a single subsite, or theme, depending on your needs.

On the WordPress.com VIP platform
The maintenance mode plugin is enabled by default. To activate the plugin, simply:

1. Add the VIP_MAINTENANCE_MODE constant to your theme and set to true
2. Load the plugin in your theme

define( 'VIP_MAINTENANCE_MODE', true );
...
// And be sure to load the plugin itself!
wpcom_vip_load_plugin( 'maintenance-mode' );

Regardless of the platform you’re on, please remember to always test locally before committing your code or submitting your PR to us for review. Once this code has been committed, you can open a browser page which you are not logged-in to view the maintenance mode page.

IMPORTANT: if you’re not seeing maintenance mode enabled on the frontend of your site, check the (WordPress.com) logged-in vs. logged-out experience…they’re different, by design! In the backend, you won’t see much as this is a code-only plugin.

Custom Template

To add a custom template / messaging:

  • Add a template to your theme’s root folder called template-maintenance-mode.php.
  • This should be a simple HTML page that should include the message(s) you want to show your visitors.
  • Note: the template should include wp_head() and wp_footer() calls. You can find an example file here.

Ready to get started?

Drop us a note.

No matter where you are in the planning process, we’re happy to help, and we’re actual humans here on the other side of the form. 👋 We’re here to discuss your challenges and plans, evaluate your existing resources or a potential partner, or even make some initial recommendations. And, of course, we’re here to help any time you’re in the market for some robust WordPress awesomeness.