Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Use wp-config-wplib.box.php as starter local config.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeschinkel committed Aug 10, 2018
1 parent ef4fdea commit c88fec2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions www/wp-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@
? preg_replace( '#^www\.(.+)$#', '$1', $hostname )
: $hostname
);
unset( $hostname );

define( 'BOX_LOCAL_CONFIG', '/wp-config-' . BOX_HOST . '.php' );
if ( isset( $_ENV[ 'WPLIB_BOX' ] ) && ! is_file( dirname( __FILE__ ) . BOX_LOCAL_CONFIG ) ) {
file_put_contents( dirname( __FILE__ ) . BOX_LOCAL_CONFIG, "<?php\n#\n# Local configuration for {$hostname}\n#\n" );
$config = file_get_contents( dirname( __FILE__ ) . '/wp-config-wplib.box.php' );
file_put_contents( dirname( __FILE__ ) . BOX_LOCAL_CONFIG, $config );
}
unset( $hostname );
unset( $config );


/**
* Search for a wp-config-{HTTP_HOST}.php in current
Expand Down

0 comments on commit c88fec2

Please sign in to comment.