-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Draft/POC for SQLite support in Core #3220
base: trunk
Are you sure you want to change the base?
Conversation
1adc931
to
ed7ce6f
Compare
59dec75
to
206cccc
Compare
981e7a9
to
e66cf88
Compare
Update: This PR now translates queries using the MySQL lexer from sqlite-database-integration instead of regular expressions from wp-sqlite-db. The new implementation is a lot safer and more reliable. |
0593fb1
to
3e2c5a4
Compare
I pushed a change as a proof-of-concept for how the installation screen can change.
|
bc7a244
to
0e05194
Compare
56f2452
to
34bb856
Compare
c71f135
to
8d58ffc
Compare
This is really nice also because it would better enable usage of WordPress as a Static Site Generator (as it simplifies operating WordPress using file system only, for both settings and content) for simple content-only WordPress-based blogs |
hi folks. I've seen a bit of pushback against SQLite because of both the license it uses, along with their policy for accepting contributions. If this is still a bone of contention, it's worth knowing that there is a API compatible fork of SQLite called libSQL, which has a code of conduct, and accepts contributions, and uses an OSI approved open source licence. Here's the manifesto published, explaining why it exists: Here's the project: It's also worth knowing that there is work ongoing to support libSQL in Laravel, and they detail their reasons for doing so too: For what it's worth, I'm a fan of SQLite (or SQLite compatible) support making it into Wordpress, so I'm happy to see it in core, as I actually think it could make for a nicer (albeit different) onboarding experience than the famous 5 minute install. |
Just a quick question, when using the SQLite drop-in, does anybody get errors on wp 6.5 regarding the minimum MySQL version? |
This would also lead a way to SSG mode where the content is stored in individual text files (as markdown or json). Writing a script for populating a temp SQLite database from a bunch of text/json files/config files in directories should be quite easy An important functionality for wpcli should be conversion/export from an existing MySQL Wordpress db to a SQLite db file. |
That's already possible from the terminal, but I completely agree... A WP-CLI script specifically for that task would simplify things a lot 👍 |
Also, maybe a UI admin button for downloading/exporting existing MySQL db as a SQLite file would be useful (for the cases where we don't have an ssh access to the hosted installation and e.g. only sftp access) |
Also, an interesting idea could be implementing a SQLite vtab extension which would allow directly working with posts/pages stored as files in a file directory and config in a json file on disk even without importing them to a temp SQLite database file |
And maybe this export-everything-as-a-single-sqlite-db-file admin UI functionality (and wp-cli functionality) could be merged in the mainline even before the merge of the full Sqlite support changeset... |
In general, curious what is the status of this feature/merging-into-the-mainline with the core Wordpress team? Looking forward to benefit from this feature in mainline :) Oh I see, it appears that first the parser migration needs to be done: |
Yup. It seems we are now looking for MySQL and fail otherwise? |
This is a POC for porting https://wordpress.org/plugins/sqlite-database-integration/ to Core.
Trac ticket: https://core.trac.wordpress.org/ticket/57793
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.