-
Notifications
You must be signed in to change notification settings - Fork 330
Open
Labels
[Package][@wp-playground] WordPress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Today, Playground unconditionally defines a DB_NAME constant in wp-config.php
if it examines the config and finds DB_NAME to be missing. This causes a config conflicts with platforms like WP Cloud that define DB_NAME and other constants as part of PHP's auto_prepend_file
setting.
To fix this, let's make the define in wp-config.php conditional like:
/*
* BEGIN: Added by WordPress Playground.
*
* Here we can even explain and document
* what this is and what is it used for,
* if it's safe to touch it, etc.
*/
if ( ! defined( 'DB_NAME' ) ) {
define( 'DB_NAME', 'some-default' );
}
/* END: Added by WordPress Playground. */
require_once ABSPATH . 'wp-settings.php';
In addition, let's consider whether changing a user's pre-existing wp-config.php file should require user opt-in.
cc @wojtekn who reported this issue and @JanJakes and @zaerl who helped determine a path forward.
Metadata
Metadata
Assignees
Labels
[Package][@wp-playground] WordPress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended