Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly set DB_ constants in loadOnly:true #755

Merged
merged 5 commits into from
Sep 11, 2024
Merged

Conversation

lucatume
Copy link
Owner

Fixes #753

This updates the WPLoader module, and its documentation, to make sure the database used when using the module in loadOnly:true mode will be the one specified by the dbUrl or other db configuration parameters.
The module will silence redeclarations of the DB_HOST, DB_USER, DB_PASSWORD and DB_NAME constants.
The module will also set the WPBROWSER_LOAD_ONLY env var to either 1 or 0 depending on the configuration of loadOnly to true or false respectively.

The latter should provide support for more advanced configurations and mitigations when WordPress set ups with stricter checking (e.g. Bedrock) would render the redefinition silencing useless.

@lucatume lucatume marked this pull request as ready for review September 10, 2024 15:05
@lucatume lucatume merged commit 3026504 into master Sep 11, 2024
47 checks passed
@lucatume lucatume deleted the v4-issue-753 branch September 11, 2024 07:47
lucatume added a commit that referenced this pull request Sep 11, 2024
lucatume added a commit that referenced this pull request Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] fatal error with WPLoader on 4.3.0, LoadSandbox tries to use DB from wp-config, not test config
1 participant