Skip to content

Keep SQLite plugin up-to-date as part of studio site start command - #2145

Merged
fredrikekelund merged 6 commits into
trunkfrom
f26d/cli-update-sqlite-on-site-start
Nov 28, 2025
Merged

Keep SQLite plugin up-to-date as part of studio site start command#2145
fredrikekelund merged 6 commits into
trunkfrom
f26d/cli-update-sqlite-on-site-start

Conversation

@fredrikekelund

Copy link
Copy Markdown
Contributor

Related issues

Proposed Changes

  • Call keepSqliteIntegrationUpdated as part of the studio site start command.
  • Move shared SQLite installation logic to abstract SqliteIntegrationProvider class in common directory.
  • Add CliSqliteProvider and ElectronSqliteProvider classes that extend SqliteIntegrationProvider and provide the appropriate paths.
  • Move tests to common/lib/tests/sqlite-integration.test.ts

Testing Instructions

  1. Run npm run cli:build
  2. Remove wp-config.php and wp-content/db.php from a site's folder
  3. Run node dist/cli/main.js site start --path PATH_TO_SITE (where PATH_TO_SITE is the path to the site you just removed the files from)
  4. Ensure that wp-content/db.php is recreated on disk

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@fredrikekelund
fredrikekelund requested review from a team and bcotrim November 27, 2025 14:14
@fredrikekelund fredrikekelund self-assigned this Nov 27, 2025
@github-actions

github-actions Bot commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

📊 Performance Test Results

Comparing fc4530d vs trunk

site-editor

Metric trunk fc4530d Diff Change
load 7720.00 ms 10099.00 ms +2379.00 ms 🔴 30.8%

site-startup

Metric trunk fc4530d Diff Change
siteCreation 14151.00 ms 15987.00 ms +1836.00 ms 🔴 13.0%
siteStartup 5962.00 ms 6014.00 ms +52.00 ms 🔴 0.9%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

@bcotrim bcotrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM 👍
Worked as expected on macOS but not on Windows

macOS Windows
Image Image
@fredrikekelund

Copy link
Copy Markdown
Contributor Author

Thanks for catching that, @bcotrim 👍 I've updated the PR so it works on Windows, too

@bcotrim bcotrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
I couldn't test the change on Windows due to #2152 but the adjustment for Windows looks good and follows the Studio app approach

@fredrikekelund
fredrikekelund merged commit 59daed8 into trunk Nov 28, 2025
8 of 9 checks passed
@fredrikekelund
fredrikekelund deleted the f26d/cli-update-sqlite-on-site-start branch November 28, 2025 16:00
@gcsecsey gcsecsey mentioned this pull request Dec 9, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants