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
define( 'VIP_MAINTENANCE_MODE', true );
3. Load the plugin in
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
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.
To add a custom template / messaging:
- Add a template to your theme’s root folder called
- 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_footer()calls. You can find an example file here.