Skip to content
Browse files

Add a check for a staging database configuration

Looks for a staging-config.php in the same way it looks for a local-config.php
  • Loading branch information...
1 parent 8884707 commit 381c54c6c5546ef06623685b483e381e5e3ba85f @dlh01 committed
Showing with 4 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +3 −1 wp-config-sample.php
View
1 .gitignore
@@ -1,6 +1,7 @@
# WP config files
wp-config.php
local-config.php
+staging-config.php
# Some of GitHub's recommended ignores
# https://github.com/github/gitignore/blob/master/Wordpress.gitignore
View
4 wp-config-sample.php
@@ -1,11 +1,13 @@
<?php
/* =============================================================================
- Set database info, but use local-config.php if it exists
+ Define our production settings, but check for local or staging settings first
========================================================================== */
if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) {
include( dirname( __FILE__ ) . '/local-config.php' );
+} elseif ( file_exists( dirname( __FILE__ ) . '/staging-config.php' ) ) {
+ include( dirname( __FILE__ ) . '/staging-config.php' );
} else {
/*

0 comments on commit 381c54c

Please sign in to comment.
Something went wrong with that request. Please try again.