Skip to content

Using SQLite integration as a layer to store/load wordpress posts from file system files via vtab (e.g. posts would correspond to files in wp_posts directory) #173

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

Open
vadimkantorov opened this issue Feb 16, 2025 · 0 comments

Comments

@vadimkantorov
Copy link

vadimkantorov commented Feb 16, 2025

Supporting SQLite might also unlock transparent storing/loading wordpress posts (wp_posts table) in bare file system files (akin to Jekyll and other SSR blog engines) and using SQLite vtab (virtual table extension - I think something based on fsdir might work) mechanism for abstracting this away. This would allow for simpler interop with other blog engines (especially for small installations), especially when combined with some Markdown plugin

Likely fsdir would need to be forked/rewritten to adapt the column names to existing wp_posts DDL

And also "eponymous virtual tables" can be of use to completely mimic the wp_posts table even without a CREATE VIRTUAL TABLE command: https://www.sqlite.org/vtab.html#epovtab

In a similar way, a vtab can be created to back wp_options table with a single JSON/YAML file on disk (wp_options.json or wp_options.yaml)


I've tried asking DeepSeek to write code for such two vtab extensions (wp_posts and wp_options) and produces something reasonable and even not too much code. I assume there would be nuances (not sure if then indexes can be created for such vtabs and if it would break anything else in WordPress), but it seems viable

@vadimkantorov vadimkantorov changed the title Using SQLite integration as a layer to store/load wordpress posts from file system files (e.g. posts would correspond to files in wp_posts directory) Using SQLite integration as a layer to store/load wordpress posts from file system files (e.g. posts would correspond to files in wp_posts directory) via vtab Feb 16, 2025
@vadimkantorov vadimkantorov changed the title Using SQLite integration as a layer to store/load wordpress posts from file system files (e.g. posts would correspond to files in wp_posts directory) via vtab Using SQLite integration as a layer to store/load wordpress posts from file system files via vtab (e.g. posts would correspond to files in wp_posts directory) Feb 16, 2025
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

No branches or pull requests

1 participant