该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

Maintenance Switch

描述

One-click maintenance mode

This plugin adds a button to the admin bar for toggling the builtin maintenance mode.

Core maintenance mode

A .maintenance file is generated and copied to the WordPress installation folder when turning on the maintenance mode.
A maintenance.php file is generated and added to the wp-content folder for custom HTML code.

Your custom maintenance page will also be active during the core, plugins and themes updates.

Special Features

  • set which roles can switch the maintenance mode

  • set which roles can bypass the maintenance mode on the frontend

  • set the entire HTML code used for the maintenance page

  • preview the maintenance page before saving

  • enable the theme file support, so you can create in each your themes a maintenance.php file to customize the maintenance page

  • restore all default settings

  • restore default HTML code

  • create/delete the maintenance file in the active WP theme

Translations

  • English – default, always included
  • French

屏幕截图

  • A button is added to the admin bar for simple toggling in maintenance mode.
  • The "Display" tab of the settings page allow you to define the entire HTML code of your maintenance page, or use a custom file in your theme.
  • The "Permissions" tab of the settings page allow you to define which user roles can bypass the maintenance mode (to visit the website when maintenance mode is on).
  • The "Behavior" tab of the settings page allow you to change the http error code returned by the maintenance page.

安装

This section describes how to install the plugin and get it working.

Using The WordPress Dashboard

  1. Navigate to the ‘Add New’ in the plugins dashboard
  2. Search for ‘maintenance-switch’
  3. Click ‘Install Now’
  4. Activate the plugin on the Plugin dashboard

Uploading in WordPress Dashboard

  1. Navigate to the ‘Add New’ in the plugins dashboard
  2. Navigate to the ‘Upload’ area
  3. Select maintenance-switch.zip from your computer
  4. Click ‘Install Now’
  5. Activate the plugin in the Plugin dashboard
  6. Navigate to ‘Settings’ > ‘Maintenance Switch’
  7. Adjust and save your settings

Using FTP

  1. Download maintenance-switch.zip
  2. Extract the maintenance-switch directory to your computer
  3. Upload the maintenance-switch directory to the /wp-content/plugins/ directory
  4. Activate the plugin in the Plugin dashboard
  5. Navigate to ‘Settings’ > ‘Maintenance Switch’
  6. Adjust and save your settings

Follow this plugin on GitHub

常见问题

Can I set a counter for coming soon page?

The plugin allows you to set the entire HTML code of the maintenance page, you can implement a counter with css and js code.

Is my maintenance page HTML used during the core maintenance?

Yes, the maintenance.php file is used.

Does the plugin automatically detects the url login?

Yes.

Is it possible to customize page from my theme?

Yes, use the settings page to enable the theme file support.

评价

2021年1月4日
I've noticed this plugin has not been updated for over three years. Is there a reason for this? Has the developer lost interest? Ordinarily, I would advise my clients not to use any plugin that has not been updated for 12 months or more. Although, I'd add that, ideally, use plugins that have been updated within the last 6 months. Plugins that are not updated regularly pose a potential security risk to your website. And, as such, I will be finding an alternative plugin and removing this one from all my sites and my clients' sites. I would advise anyone else considering using this plugin to exercise caution. As I said, plugins that are not kept updated pose a potential security risk to your website, as they can open up back doors that would-be hackers can exploit.
2019年9月13日
I had to look for a while and finally found this plugin which is really simple without any of the unnecessary stuff. Exactly what I needed.
2018年10月11日
Having the ability to toggle the switch on and off from the admin bar and test your site in another web browser works extremely efficiently.
2016年9月3日
This is the cleanest WP maintenance plugin I have ever used. Thank you!
2016年9月3日
Testet on WP 4.5 and it works great. Nice Plugin, which option to insert complete HTML-site. TOP!
阅读所有13条评价

贡献者及开发者

“Maintenance Switch” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

“Maintenance Switch”插件已被翻译至1种本地话语言。 感谢所有译者为本插件所做的贡献。

将“Maintenance Switch”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

1.5.2

  • Fix the preview page bug with code editor

1.5.1

  • Fix the disabled code field bug
  • Enqueue admin assets only on settings page

1.5.0

  • Add a gitignore and gulp files
  • Add the wp code editor to the page HTML setting
  • Test for compatibility with WordPress 4.9

1.4.0

  • Add a info link about moving to GitHub
  • Test for compatibility with WordPress 4.7

1.3.8

  • Adding an option for stoping to return 503 error code

1.3.7

  • Fix a bug of settings initialization

1.3.6

  • Fix a php in_array warning in admin display

1.3.5

  • Fix a php error in the admin

1.3.4

  • Fix a bug with migration of settings

1.3.3

  • Fix bug with data saving
  • Fix bug with HTML encoding
  • Fix bug with files generation
  • Fix a very persistent bug with settings migration

1.3.2

  • Fix a persistent bug with settings migration

1.3.1

  • Fix a PHP4 compatibility issue
  • Fix a bug with settings migration
  • Improve some styles

1.3.0

  • Improve performances
  • Implement WP Settings API
  • Adding reset features

1.2.2

  • Adding POT language file
  • Updating language files

1.2.1

  • Fix a bug with html code in preview page
  • Fix a bug when delete theme file after activating it

1.2.0

  • Improve the switch button appearance
  • Adding Maintenance page preview

1.1.8

  • Change the plugin description in admin area

1.1.7

  • Adding roles management for maintenance control
  • Fix a icon bug on the switch button

1.1.6

  • Adding omitted translations
  • Fix a bug about the HTML text config

1.1.5

  • Adding French translations
  • Improve the default HTML texts

1.1.4

  • Fix the bug to get IP through a proxy

1.1.3

  • Fix a ajax button bug

1.1.2

  • Fix a deactivation bug after updates

1.1.1

  • Fix a deactivation bug after updates
  • Adding the status management in database
  • Adding the ability to use a maintenance.php file in the theme

1.0.7

  • Fix a saving bug in the settings page

1.0.6

  • Fix a js bug with the “add my ip” button

1.0.5

  • Fix a php syntax error in config.php

1.0.4

  • Adding exceptions for IP addresses

1.0.3

  • Adding automatic detection of the login url

1.0.2

  • Ajusting the readme file

1.0.1

  • Fully rewritten with http://wppb.me/ boilerplate.
  • Adding activate and deactivate functionalities.
  • Fix switch button styles and actions from frontend.

1.0.0

  • A change since the previous version.
  • Another change.

1.0-alpha

  • First simple implementation of the main functionality