-
Notifications
You must be signed in to change notification settings - Fork 244
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
Explore: Setup SQLite database integration without creating wp-content/db.php #1382
Merged
adamziel
merged 5 commits into
trunk
from
setup-sqlite-integration-without-creating-db-php
May 14, 2024
Merged
Explore: Setup SQLite database integration without creating wp-content/db.php #1382
adamziel
merged 5 commits into
trunk
from
setup-sqlite-integration-without-creating-db-php
May 14, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adamziel
added
[Type] Exploration
An exploration that may or may not result in mergable code
[Package][@wp-playground] CLI
labels
May 13, 2024
Nice idea! |
adamziel
force-pushed
the
setup-sqlite-integration-without-creating-db-php
branch
from
May 14, 2024 09:52
cc65960
to
ba99209
Compare
adamziel
commented
May 14, 2024
"packages/playground/wordpress/**/*.ts", | ||
"packages/playground/wordpress/package.json" | ||
] | ||
"lintFilePatterns": ["packages/playground/wordpress/**/*.ts"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is technically unrelated, but this PR introduces a few dependencies that trigger an eslint warning – let's just get it in as a part of this PR.
adamziel
added a commit
that referenced
this pull request
May 15, 2024
Prevents creating a `wp-config.php` file in WordPress document root. Instead, creates it one level higher as WordPress falls back to loading it from there. Related to #1398. Similar to #1382 and #1401. ## Testing instructions Run `bun packages/playground/cli/src/cli.ts server --login` and confirm it loads an installed WordPress.
adamziel
added a commit
that referenced
this pull request
May 15, 2024
Prevents creating a `wp-config.php` file in WordPress document root. Instead, creates it one level higher as WordPress falls back to loading it from there. Related to #1398. Similar to #1382 and #1401. ## Testing instructions Run `bun packages/playground/cli/src/cli.ts server --login` and confirm it loads an installed WordPress.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Package][@wp-playground] CLI
[Type] Exploration
An exploration that may or may not result in mergable code
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this PR doing?
Related to #1379
Loads the SQLite database integration without creating a drop-in
wp-content/db.php
plugin. Instead, it leans on theauto_prepend_file
PHP option to provide a fake global$wpdb
variable. This prevents WordPress from trying to connect to MySQL. The first time that$wpdb
is used for reading or a method call, it loads the actual SQLite database integration.Follow-up work
Use the same SQLite setup method in the web version of Playground. This could happen either when a non-minified WordPress build is used or, for simplicity, always if we remove the SQLite integration plugin from the minified build.
Testing instructions
Run
bun packages/playground/cli/src/cli.ts server --login
and confirm the server starts without any database errors.Test coverage coming as a part of the larger boot protocol discussion, see #1379.