forked from studio24/wordpress-multi-env-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wp-config.env.php
40 lines (35 loc) · 832 Bytes
/
wp-config.env.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* Setup environments
*
* Set environment based on the current server hostname, this is stored
* in the $hostname variable
*
* You can define the current environment via:
* define('WP_ENV', 'production');
*
* @package Studio 24 WordPress Multi-Environment Config
* @version 1.0
* @author Studio 24 Ltd <[email protected]>
*/
/*
* Set environment based on hostname
*
* If you just use localhost for your local test environment then in place of:
* case 'domain.dev':
*
* Just use:
* case 'localhost':
*
*/
switch ($hostname) {
case 'domain.dev':
define('WP_ENV', 'development');
break;
case 'staging.domain.com':
define('WP_ENV', 'staging');
break;
case 'www.domain.com':
default:
define('WP_ENV', 'production');
}