Skip to content

Document SQLite database storage and DB_PATH - #520

Merged
JanJakes merged 1 commit into
trunkfrom
document-database-storage
Oct 8, 2026
Merged

JanJakes merged 1 commit into
trunkfrom
document-database-storage

Conversation

@JanJakes

@JanJakes JanJakes commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Document randomized database storage and DB_PATH configuration in the plugin FAQ and a new plugin README, including protection from public web access.

The new README also covers usage, requirements, and development. Link it from the root README and exclude it from plugin release ZIPs.

Related to #502 and #512.

Summary by CodeRabbit

  • Documentation
    • Added setup, configuration, security, development, and licensing guidance for the SQLite integration plugin.
    • Expanded the FAQ with details on default and custom database paths, changing database locations, and temporary in-memory databases.
    • Clarified storage requirements and recommended keeping database files in a protected location outside the web root.
    • Updated the component list to link directly to the plugin package.
  • Chores
    • Excluded the package README from the plugin release archive.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f9b9466-4af6-4a70-aa0a-e1329a354346
📥 Commits

Reviewing files that changed from the base of the PR and between bef515a and 94dc245.

📒 Files selected for processing (1)
  • packages/plugin-sqlite-database-integration/readme.txt

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changes document the SQLite integration plugin and its database-path options, link to its package directory, and remove its Markdown README from the generated plugin archive.

Changes

Plugin documentation and packaging

Layer / File(s) Summary
Plugin documentation
packages/plugin-sqlite-database-integration/README.md, packages/plugin-sqlite-database-integration/readme.txt
The plugin readmes cover setup, database storage and DB_PATH, development commands, requirements, and licensing.
Package listing and archive output
README.md, bin/build-sqlite-plugin-zip.sh
The component list links to the package directory. The build script removes README.md before creating the archive.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 94dc2

The documented SQLite storage location matches the plugin’s default behavior; no issue identified here prevents merging.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: documenting SQLite database storage and DB_PATH configuration. It is concise and specific.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JanJakes
JanJakes force-pushed the document-database-storage branch 4 times, most recently from ffe0e38 to bef515a Compare October 8, 2026 13:47
@JanJakes
JanJakes marked this pull request as ready for review October 8, 2026 13:48
@JanJakes
JanJakes force-pushed the document-database-storage branch from bef515a to 94dc245 Compare October 8, 2026 13:55
@JanJakes
JanJakes merged commit 43f3988 into trunk Oct 8, 2026
8 checks passed
@JanJakes
JanJakes deleted the document-database-storage branch October 8, 2026 14:07
@JanJakes JanJakes changed the title Document SQLite database storage and DB_PATH Document SQLite database storage and DB_PATH Oct 8, 2026
@JanJakes JanJakes mentioned this pull request Oct 8, 2026
JanJakes added a commit that referenced this pull request Oct 8, 2026
## Release `3.1.0`

Prepares the version numbers and release notes for `3.1.0`.

**Changelog draft:**

---

**SQLite Database Integration 3.1 is here! 🎉**

This release improves **database storage and configuration** and fixes
several MySQL compatibility issues.

## What's new

Version 3.1 improves how WordPress sites store, locate, and protect
their SQLite databases. It also fixes SQL behavior and export
compatibility:

- **Randomized database paths:** The default database location is now a
randomized directory under `wp-content/database/`, recorded in
`wp-content/database/db-path.php`.
([#502](#502))
- **`DB_PATH`:** Configure the database with one full-path constant,
also available at runtime for integrations.
([#512](#512))
- **SQL compatibility:** Fix `IF()` condition evaluation and make
`TRADITIONAL` enable its component SQL modes.
([#518](#518),
[#509](#509))
- **WordPress table collations:** Default to `utf8mb4_unicode_520_ci`
for new tables created with WordPress's charset settings, improving
exports to MariaDB. Existing tables keep their recorded collation.
([#514](#514))
- **Documentation:** A new plugin README and expanded FAQ explain
database storage and secure configuration.
([#520](#520))

For more information about database paths and secure configuration, read
the [database storage
guide](https://github.com/WordPress/sqlite-database-integration/blob/trunk/packages/plugin-sqlite-database-integration/README.md#database-storage).

## Upgrading to 3.1

Upgrading an existing SQLite site is straightforward:

1. **Back up** your SQLite database.
2. **Update the plugin** to version 3.1.

Existing `.ht.sqlite` and `.ht.sqlite.php` databases move to the
randomized layout automatically unless a database file path is
explicitly configured.

To properly **secure the database**, set `DB_PATH` in `wp-config.php` to
an absolute file path outside the web root that your web server does not
expose. Its directory must be writable by PHP. Changing `DB_PATH` does
not move an existing database.

## Breaking changes

Review these changes if you use custom database settings or
integrations:

- **Database paths:** Default database files now move to randomized
paths under `wp-content/database/`. Explicitly configured file paths
stay unchanged. Integrations, including backup and migration tools, must
read `DB_PATH` after WordPress loads instead of assuming a fixed
filename.
- **Legacy constants:** `DB_DIR` and `DB_FILE` are now deprecated. They
and the previously deprecated `FQDB` and `FQDBDIR` remain supported, but
`DB_PATH` takes precedence. Conflicting values trigger warnings.
- **Absolute paths:** Relative database file and directory paths are now
rejected. `:memory:` remains available for in-memory databases.

## Thank you

Thank you to everyone who contributed, tested, and helped update
integrations.

**Changes since 3.0.2:**
[`v3.0.2...v3.1.0`](v3.0.2...v3.1.0)

---

**PR comparison:**
[`v3.0.2...release/v3.1.0`](v3.0.2...release/v3.1.0)

## Next steps

1. **Review** the release changes and changelog draft.
2. **Merge** this pull request to complete the release.

Merging will automatically build the plugin ZIP, create a [GitHub
release](https://github.com/WordPress/sqlite-database-integration/releases),
and deploy to
[WordPress.org](https://wordpress.org/plugins/sqlite-database-integration/).
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.

1 participant