Skip to content

Commit 8841c8e

Browse files
author
Maya Baya
committed
feat: Add support for env variable WORDPRESS_DB_TABLE_PREFIX
1 parent f349363 commit 8841c8e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ ENV AUTO_UPDATE_CRON="0 5 * * TUE" \
2525
WP_SITE_ADMIN_PASSWORD=riotkit \
2626
WP_SITE_ADMIN_EMAIL=example@example.org \
2727
ACCESS_LOG=/dev/stdout \
28-
ERROR_LOG=/dev/stderr
28+
ERROR_LOG=/dev/stderr \
29+
WORDPRESS_DB_TABLE_PREFIX=wp_
2930

3031
# p2 (jinja2)
3132
RUN wget https://github.com/wrouesnel/p2cli/releases/download/r13/p2-linux-x86_64 -O /usr/bin/p2 && chmod +x /usr/bin/p2

wp-config-sample.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
* You can have multiple installations in one database if you give each
5959
* a unique prefix. Only numbers, letters, and underscores please!
6060
*/
61-
$table_prefix = 'wp_';
61+
$table_prefix = isset($_SERVER['WORDPRESS_DB_TABLE_PREFIX']) ? $_SERVER['WORDPRESS_DB_TABLE_PREFIX'] : 'wp_';
6262

6363
/**
6464
* For developers: WordPress debugging mode.

0 commit comments

Comments
 (0)