Title: Enabling plugin from cli
Last modified: January 11, 2017

---

# Enabling plugin from cli

 *  Resolved [mac_master_it](https://wordpress.org/support/users/mac_master_it/)
 * (@mac_master_it)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/enabling-plugin-from-cli/)
 * Hi support,
    I need to put offline my website at 3.00AM and come back online 
   at 6.00AM. I wanna use a bash script in crontab. How can i enable Maintenance
   from cli?
 * BR

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Fruitful Code](https://wordpress.org/support/users/fruitfulcode/)
 * (@fruitfulcode)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/enabling-plugin-from-cli/#post-8646930)
 * Hi.
 * Thank you for contacting us.
 * Unfortunately, it is not possible by default plugin options.
 * It is possible only by custom development. If you are interested, please send
   a request to our Support and we will provide estimation soon.
 * [http://support.fruitfulcode.com/hc/en-us/requests/new](http://support.fruitfulcode.com/hc/en-us/requests/new)
 * Regards.
 *  [rklrkl](https://wordpress.org/support/users/rklrkl/)
 * (@rklrkl)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/enabling-plugin-from-cli/#post-8725007)
 * I would suggest looking at WP-CLI for this:
 * [http://wp-cli.org/](http://wp-cli.org/)
 * Enable maintenance mode permanently and then you can use these commands to activate
   or deactivate the plugin (where “webuser” is the user the Web server runs as):
 * sudo -u webuser wp –path=/full/path/to/web/tree/root wp –path=/full/path/to/web/
   tree/root plugin activate maintenance
    (would activate the plugin and switch 
   on maintenance mode)
 * sudo -u webuser wp –path=/full/path/to/web/tree/root plugin deactivate maintenance
   (
   would deactivate the plugin and switch off maintenance mode)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Enabling plugin from cli’ is closed to new replies.

 * ![](https://ps.w.org/maintenance/assets/icon-256x256.png?rev=2689583)
 * [Maintenance](https://wordpress.org/plugins/maintenance/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/maintenance/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/maintenance/)
 * [Active Topics](https://wordpress.org/support/plugin/maintenance/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/maintenance/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/maintenance/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [rklrkl](https://wordpress.org/support/users/rklrkl/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/enabling-plugin-from-cli/#post-8725007)
 * Status: resolved