Skip to content

Conversation

@wojtekn
Copy link
Contributor

@wojtekn wojtekn commented Nov 6, 2025

Related issues

Proposed Changes

  • I propose upgrading the SQLite driver to 2.2.14.

Testing Instructions

  • Confirm the Studio site is created correctly
  • Confirm existing Studio sites work correctly
  • Confirm site import that includes Wordfence can be imported successfully

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@wojtekn wojtekn self-assigned this Nov 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

📊 Performance Test Results

Comparing 636b754 vs trunk

site-editor

Metric trunk 636b754 Diff Change
load 11155.00 ms 17666.00 ms +6511.00 ms 🔴 58.4%

site-startup

Metric trunk 636b754 Diff Change
siteCreation 29329.00 ms 26402.00 ms -2927.00 ms 🟢 -10.0%
siteStartup 8102.00 ms 8031.00 ms -71.00 ms 🟢 -0.9%

Results are median values from multiple test runs.

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

@wojtekn
Copy link
Contributor Author

wojtekn commented Nov 7, 2025

It works well for me - I can import SQL:

/*M!999999\- enable the sandbox mode */ 
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `wp_wfconfig` (
  `name` varchar(100) NOT NULL,
  `val` longblob DEFAULT NULL,
  `autoload` enum('no','yes') NOT NULL DEFAULT 'yes',
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO `wp_wfconfig` (`name`, `val`, `autoload`) VALUES ('actUpdateInterval','2','yes');

@wojtekn wojtekn requested a review from a team November 7, 2025 10:52
Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

The change looks good and I can confirm the SQL export from WordPress/sqlite-database-integration#268 can now be imported successfully. 🎉


Update: Turns out the following has been reported over here yesterday: WordPress/sqlite-database-integration#284.

However, I also noticed that it is not possible to activate the Wordfence plugin (on a fresh site) due to the following fatal error (this is the case for the current trunk as well, so not related to the PR).

[07-Nov-2025 13:23:06 UTC] Lock not acquired 
[07-Nov-2025 13:23:10 UTC] PHP Warning:  Trying to access array offset on null in /wordpress/wp-content/plugins/wordfence/lib/wfDB.php on line 162
[07-Nov-2025 13:23:10 UTC] PHP Fatal error:  Uncaught Error: Call to undefined method WP_SQLite_Driver::prepare() in /wordpress/wp-content/plugins/wordfence/lib/wfConfig.php:883
Stack trace:
#0 /wordpress/wp-content/plugins/wordfence/models/scanner/wfScanner.php(1339): wfConfig::set_ser('allScansSchedul...', Array)
#1 /wordpress/wp-content/plugins/wordfence/models/scanner/wfScanner.php(1199): wfScanner->unscheduleAllScans()
#2 /wordpress/wp-content/plugins/wordfence/lib/wordfenceClass.php(1130): wfScanner->scheduleScans()
#3 /wordpress/wp-content/plugins/wordfence/lib/wordfenceClass.php(1195): wordfence::runInstall()
#4 /wordpress/wp-content/plugins/wordfence/wordfence.php(146): wordfence::install_actions()
#5 /wordpress/wp-admin/includes/plugin.php(2387): include_once('/wordpress/wp-c...')
#6 /wordpress/wp-admin/includes/plugin.php(673): plugin_sandbox_scrape('wordfence/wordf...')
#7 /wordpress/wp-admin/plugins.php(60): activate_plugin('wordfence/wordf...', 'http://localhos...', false)
#8 {main}
  thrown in /wordpress/wp-content/plugins/wordfence/lib/wfConfig.php on line 883

This is at the following line in wfConfig.php:883:

$stmt = $dbh->prepare("INSERT IGNORE INTO " . self::table() . " (val, name, autoload) VALUES (?, ?, ?)");

@wojtekn
Copy link
Contributor Author

wojtekn commented Nov 7, 2025

@ivan-ottinger thanks for testing it.

I reproduced the issue, and as you found, it seems to be a plugin issue, and the Playground team has it already on their plate.

@wojtekn wojtekn merged commit 3c03e20 into trunk Nov 7, 2025
9 checks passed
@wojtekn wojtekn deleted the update/sqlite-driver-to-2.2.14 branch November 7, 2025 14:52
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.

3 participants