Request plugin not “die()” if wp-config.php is not writable.
-
Thank you for a great plugin!
I would like to make one request… that the plugin not call die() if it can’t write wp-config.php.
When I try to start up a site on my localhost machine with all the key site files checked into source control, the site won’t start and I get a “white screen of death” with the message:
Caught Exception: \Fragen\Local_Development\Init::__construct() – wp-config.php is not writable.
I understand this is because I set “Set WP_ENVIRONMENT_TYPE” to “Production” on the live site and then this option got transferred to localhost. I just wouldn’t expect WordPress not to start. Maybe display a warning. Maybe just log the error.
I worked around the problem by going to the wp_options table on my localhost installation database and deleting the “local_development” entry.
Another work-around was to edit “wp-content/plugins/local-development/src/Local_Development/ini.php and comment out line 95:
wp_die( esc_html( $messsage ) )
Not a big deal, but an improvement in this would make a great plugin even better!
- The topic ‘Request plugin not “die()” if wp-config.php is not writable.’ is closed to new replies.