WordPress / WordPress/sqlite-database-integration

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)

Open
#173 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
363
Forks
67
Avg merge
2d 15h
Merged PRs (30d)
7

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SQLite's ext/misc/fileio.c fsdir implementation and the virtual-table and eponymous virtual-table documentation linked in the issue. Compare the existing wp_posts and wp_options schemas, then determine whether file-backed virtual tables can preserve WordPress compatibility, including the proposed posts directory and JSON/YAML options files. Done means the scope, compatibility constraints, and required extensions are validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, sqlite, wordpress
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.