Skip to content

Commit e428b0d

Browse files
committed
move redis settings to setup.php so they are available in the admin as well
1 parent c8f0a82 commit e428b0d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

index.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@
88

99
define( 'WP_USE_THEMES', true );
1010

11-
// ==============
12-
// REDIS SETTINGS
13-
// ==============
14-
define( 'WP_REDIS_DISABLE', (int) getenv( 'WP_REDIS_DISABLE' ) );
15-
define( 'WP_REDIS_DB', getenv( 'WP_REDIS_DB' ) );
16-
define( 'WP_REDIS_DATABASE', getenv( 'WP_REDIS_DB' ) );
17-
define( 'WP_REDIS_HOST', getenv( 'WP_REDIS_HOST' ) );
18-
define( 'WP_REDIS_PASSWORD', getenv( 'WP_REDIS_PASSWORD' ) );
19-
2011
// To disable redis caching, set the WP_REDIS_DISABLE env as 1.
2112
if ( WP_REDIS_DISABLE === 1 ) {
2213
// NO CACHING

setup.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,12 @@
5252
}
5353

5454
define( 'SETUP_DONE', true );
55+
56+
// ==============
57+
// REDIS SETTINGS
58+
// ==============
59+
define( 'WP_REDIS_DISABLE', (int) getenv( 'WP_REDIS_DISABLE' ) );
60+
define( 'WP_REDIS_DB', getenv( 'WP_REDIS_DB' ) );
61+
define( 'WP_REDIS_DATABASE', getenv( 'WP_REDIS_DB' ) );
62+
define( 'WP_REDIS_HOST', getenv( 'WP_REDIS_HOST' ) );
63+
define( 'WP_REDIS_PASSWORD', getenv( 'WP_REDIS_PASSWORD' ) );

0 commit comments

Comments
 (0)