Generation of Unique Keys & SALTS in wp-config.php

Hey Nick, when you spin up a new site, along with messing up the SALTS, LocalWp adds the following to the bottom of the wp-config.php file.

define( ‘WP_ENVIRONMENT_TYPE’, ‘local’ );

See image below =>

I already add a block of code to wp-config.php on all of my dev sites which includes this, along with setting the WP_DEBUG and WP_DEVELOPMENT_MODE constants. Having LocalWP add it “twice” just adds another task to my workflow. Unfortunately LocalWP adds this even when using a Blueprint, so I have no option but to go in manually and remove it!

This topic has come up before => https://community.localwp.com/t/dont-define-wp-environment-type/24587/9

April 12, 2012:


From what I can understand, LocalWP now scans a site’s php.ini file and looks for the WP_ENVIRONMENT_TYPE constant. If it’s not found, LocalWP uses the auto-prepend-file feature to prepend a PHP file that sets the constant in wp-config.php automatically.

Perhaps there’s a very good reason the dev team does this, but I’m not sure why… The practical implementation of this “feature” is above my pay grade unfortunately. If I get some spare time I may look at adding a php.ini file to my Blueprints and see if that solves my use-case.

I’d just prefer not to have to deal with it or have the option in the UI to toggle it on or off.

Kind regards,

Paul