Support » Plugin: Maintenance » Activating maintenance mode from bash script

  • Resolved xonauqa


    Hi members,

    I am very happy with the plugin, it works just fine when I activate it in the WP settings.

    Now I would like to activate the maintenance mode from the shell (cron job with backup script), so that maintenance mode is active while the database is dumped.

    Is there a command available, or do I have to create some file in some directory to activate the plugin?

Viewing 1 replies (of 1 total)
  • Plugin Author Alexandru Tapuleasa


    No, we don’t have wp-cli support. If you want to make your own file to enable it programatically it should be something like this, assuming WP core is loaded:
    $settings = get_option('maintenance_options');
    update_option('maintenance_options', $options);

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.