Skip to content

Commit

Permalink
Add a check for a staging database configuration
Browse files Browse the repository at this point in the history
Looks for a staging-config.php in the same way it looks for a local-config.php
  • Loading branch information
dlh01 committed Nov 7, 2012
1 parent 8884707 commit 381c54c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .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
Expand Down
4 changes: 3 additions & 1 deletion 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 {

/*
Expand Down

0 comments on commit 381c54c

Please sign in to comment.