lukasjuhas / lj-maintenance-mode

Simple maintenance mode wordpress plugin.
https://plugins.itsluk.as/maintenance-mode/
25 stars 12 forks source link

BackUpBuddy compatibility #37

Open lukasjuhas opened 7 years ago

lukasjuhas commented 7 years ago

From Gordon and his support chat:

In regards to getting everything to work in maintenance mode, you'll need to find out what is preventing WordPress from connecting back to itself while in maintenance mode. WordPress will need to be able to connect back to /wp-cron.php and /wp-admin/admin-ajax.php. A lot of maintenance/coming soon/etc. plugins do not account for the fact that WordPress needs to connect back to itself. And unfortunately, I'm not involved with any of those types of plugins, so I'm not aware of any that are written well and account for the fact that WordPress needs to connect back to itself. You may want to contact the developers of the plugin/application you are using for maintenance mode to see if there is an option within their plugin/application to allow WordPress to connect back to itself. Perhaps through the whitelisting of an IP Address, Hostname, etc.

john-lang-86 commented 2 years ago

Hi Lukas,

Additional checks before the wp_die() call would fundamentally allow specific scenarios/conditions to by-pass the maintenance mode page being actioned.

The six most useful scenarios/conditions seem to be:

  1. An "Allowed IP List" check that uses $_SERVER[REMOTE_ADDR].
  2. An "Allowed URI List (Strict Match)" check that uses $_SERVER[REQUEST_URI].
  3. An "Allowed URI List" check that uses $_SERVER[REQUEST_URI].
  4. An "Allowed Query String List" check that uses $_SERVER[QUERY_STRING].
  5. An "Allowed Referer List" check that uses $_SERVER[HTTP_REFERER].
  6. An "Allowed User Agent List" check that uses $_SERVER[HTTP_USER_AGENT].
lj-maintenance-mode 6 Allow settings (2022-01-07)

Working solution available in forked Milestone. All feedback is welcomed.