-
Notifications
You must be signed in to change notification settings - Fork 0
/
wp-config.php
149 lines (113 loc) · 3.73 KB
/
wp-config.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
/**
* SET UP ENVIRONMENTS
*/
if ($_SERVER["HTTP_HOST"] === 'local.recipes.dev') {
define('WP_ENV', 'development');
} else if ($_SERVER["HTTP_HOST"] === 'dev.example.com') {
define('WP_ENV', 'staging');
} else {
define('WP_ENV', 'production');
}
/**
* ENVIRONMENT CONFIGURATIONS
*/
if (WP_ENV === 'development') {
// Site URLs
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp');
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']);
// Database
define('DB_NAME', 'wp_recipes');
define('DB_USER', 'sean');
define('DB_PASSWORD', 'optikorn1');
define('DB_HOST', 'localhost');
// Content Directory
define('WP_CONTENT_DIR', dirname(__FILE__) . '/wp-content');
define('WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content');
// Debugging
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
// define('SAVEQUERIES', true);
// define('SCRIPT_DEBUG', true);
} else if (WP_ENV === 'staging') {
// Site URLs
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp');
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']);
// Database
define('DB_NAME', 'dev_db_name');
define('DB_USER', 'dev_db_user');
define('DB_PASSWORD', 'dev_db_password');
define('DB_HOST', 'localhost');
// Content Directory
define('WP_CONTENT_DIR', dirname(__FILE__) . '/wp-content');
define('WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content');
// Debugging
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
// define('SAVEQUERIES', true);
// define('SCRIPT_DEBUG', true);
} else {
// Site URLs
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp');
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']);
// Database
define('DB_NAME', 'prod_db_name');
define('DB_USER', 'prod_db_user');
define('DB_PASSWORD', 'prod_db_password');
define('DB_HOST', 'localhost');
// Content Directory
define('WP_CONTENT_DIR', dirname(__FILE__) . '/wp-content');
define('WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content');
// Disable Debugging
define('WP_DEBUG', false);
// Prevent PHP errors from displaying
error_reporting(0);
@ini_set('display_errors', 0);
// Enable minor and major WordPress automatic updates
define('WP_AUTO_UPDATE_CORE', true);
}
/**
* CHARSET, ETC.
*/
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
/**
* AUTHENTICATION KEYS AND SALTS
*
* Generate these in production
* https://api.wordpress.org/secret-key/1.1/salt
*/
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
define('AUTH_SALT', 'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT', 'put your unique phrase here');
define('NONCE_SALT', 'put your unique phrase here');
/**
* DATABASE TABLE PREFIX
*
* Before installation, change to a random string
* https://passwd.me/api/1.0/get_password.txt
*/
$table_prefix = 'wp_';
/**
* SECURITY AND PERFORMANCE
*/
// Disable backend file editor
define('DISALLOW_FILE_EDIT', true);
// Automatically empty trashes
define('EMPTY_TRASH_DAYS', 30);
// Restrict number of revisions kept
define('WP_POST_REVISIONS', 3);
/**
* That's all, stop editing!
*/
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/wp/');
require_once(ABSPATH . 'wp-settings.php');