[wp-trac] [WordPress Trac] #63627: General: Only override `$table_prefix` if not defined
WordPress Trac
noreply at wordpress.org
Mon Oct 20 16:43:01 UTC 2025
#63627: General: Only override `$table_prefix` if not defined
-------------------------+--------------------------------
Reporter: Ninos Ego | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: php-compatibility
-------------------------+--------------------------------
Comment (by Ninos Ego):
Sorry for the late response...
I'm using some kind of wordpress bootstrapper to preload some environment
configs before initializing wordpress, e.g. database, url, proxy,
settings, ... Useful at least for containerized environments.
My current workaround is writing following line of code before including
wp-settings.php:
{{{
$table_prefix = $GLOBALS['table_prefix'];
}}}
Its not much line of codes, but I want to get rid of it (object-oriented
coding). My patch will not break anything, it just gives a bit more
flexibility initializing wordpress :-)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63627#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list