Title: Enable plugin through wp-config.php
Last modified: April 8, 2020

---

# Enable plugin through wp-config.php

 *  Resolved [greenpeppercs](https://wordpress.org/support/users/greenpeppercs/)
 * (@greenpeppercs)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/enable-plugin-through-wp-config-php/)
 * Is there a way to enable maintenance mode through code (in wp-config.php for 
   eample)?
 * This would be very useful in staging or dev versions when you import DB from 
   the prod to dev, so you don’t have to remember each time to enable it again.

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

 *  Plugin Author [WebFactory](https://wordpress.org/support/users/webfactory/)
 * (@webfactory)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/enable-plugin-through-wp-config-php/#post-12644700)
 * Hi, at the moment – no 🙁
    But that’s a great idea! I’ll look into it and see
   if we can make it happen ASAP. Do you know any other plugins that have this? 
   So we can have a look at their code? 🙂
 *  Thread Starter [greenpeppercs](https://wordpress.org/support/users/greenpeppercs/)
 * (@greenpeppercs)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/enable-plugin-through-wp-config-php/#post-12644901)
 * Very good news 🙂
    Contact form 7 has this kind of option. This possible to disable
   the loading of their scripts on all pages for example (via wp-config.php or functions.
   php). Heire is the link :[https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/](https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/)
 *  Plugin Author [WebFactory](https://wordpress.org/support/users/webfactory/)
 * (@webfactory)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/enable-plugin-through-wp-config-php/#post-12644911)
 * I’ll have a look. Thank you!

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

The topic ‘Enable plugin through wp-config.php’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [WebFactory](https://wordpress.org/support/users/webfactory/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/enable-plugin-through-wp-config-php/#post-12644911)
 * Status: resolved