+ // If this file doesn't exist, then we are using the wp-config-sample.php
+ // file one level up, which is for the develop repo.
+ if ( file_exists( ABSPATH . 'wp-config-sample.php' ) )
+ $path_to_wp_config = ABSPATH . 'wp-config.php';
+ else
+ $path_to_wp_config = dirname( ABSPATH ) . '/wp-config.php';
+
+ $handle = fopen( $path_to_wp_config, 'w' );