[wp-trac] [WordPress Trac] #41783: allow loading wp-config.php (values) without DB bootstrap
WordPress Trac
noreply at wordpress.org
Sat Sep 2 17:43:41 UTC 2017
#41783: allow loading wp-config.php (values) without DB bootstrap
----------------------------+-----------------------------
Reporter: drzraf | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: 4.8.1
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------------------
Directly related issue: [https://github.com/wp-cli/extension-
command/issues/26 wp-cli plugin download command]
''wp-config.php'' is a fundamental and unique source of information about
the WP instance. It contains information about database, but some others
about languages/paths/...
In some case we may want to provide preprovisionned WP instance but also
about the to-be-instanciated installation: filesystem/plugin/themes/... to
be provided in the filesystem *before* WP got installed).
This may be the case when a team share a common WP filesystem image /
Docker image / ...
External tool (ex `wp-cli`) may benefit from loading not only the WP-core
helpers (like, eg, `plugins_api()`), but also to know about some constants
inside ''wp-config.php'' although DB is not yet available.
An issue is that currently, loading ''wp-config.php'' forcefully attempt a
DB connexion. This happens via the unconditional call to
`wp_set_wpdb_vars()` inside ''wp-settings.php''
We rather should provide a mechanism to optionally disable such a
behaviour.
There already exist a '''SHORTINIT''' define. Could we introduce another
one that may allow to load `wp-config.php` in a database-less environment?
Indirectly related: [https://core.trac.wordpress.org/ticket/41710 WP_*
configuration constants from the environment]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41783>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list