Skip to content

Commit

Permalink
feat: Add support for env variable WORDPRESS_DB_TABLE_PREFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
Maya Baya committed Jun 23, 2022
1 parent f349363 commit 8841c8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ ENV AUTO_UPDATE_CRON="0 5 * * TUE" \
WP_SITE_ADMIN_PASSWORD=riotkit \
[email protected] \
ACCESS_LOG=/dev/stdout \
ERROR_LOG=/dev/stderr
ERROR_LOG=/dev/stderr \
WORDPRESS_DB_TABLE_PREFIX=wp_

# p2 (jinja2)
RUN wget https://github.com/wrouesnel/p2cli/releases/download/r13/p2-linux-x86_64 -O /usr/bin/p2 && chmod +x /usr/bin/p2
Expand Down
2 changes: 1 addition & 1 deletion wp-config-sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
$table_prefix = isset($_SERVER['WORDPRESS_DB_TABLE_PREFIX']) ? $_SERVER['WORDPRESS_DB_TABLE_PREFIX'] : 'wp_';

/**
* For developers: WordPress debugging mode.
Expand Down

0 comments on commit 8841c8e

Please sign in to comment.