Activating maintenance mode from bash script

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?


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer