Skip to content

Can't repair database changing from older Sqlite DB to new driver #292

@ngocphamm

Description

@ngocphamm

I came across an issue with Scheduled actions on my test WP instance using SQLite database. After some digging, I realized it's likely because I am still using the older driver, which didn't get updated to support the query that is causing issue #241.

So I tried to get my SQLite plugin to use the new format, by following the migration instructions here https://make.wordpress.org/playground/2025/06/13/introducing-a-new-sqlite-driver-for-wordpress/

After adding define( 'WP_SQLITE_AST_DRIVER', true ); to wp-config.php, reloading any page leads to the page saying I need to repair the database

Image

Clicking that button and another message

Image

After adding define('WP_ALLOW_REPAIR', true); to wp-config.php, then I see

Image

Clicking either option would result in an error screen saying it can't repair multiple tables.

Image

The list of the tables is

wp_users: 
wp_usermeta: 
wp_posts: 
wp_comments: 
wp_links: 
wp_options: 
wp_postmeta: 
wp_terms: 
wp_term_taxonomy: 
wp_term_relationships: 
wp_termmeta: 
wp_commentmeta: 

My WordPress instance

  • WordPress: 6.9
  • PHP 8.3.28

Active plugins

Image

Can someone point me to a direction where I can get this fixed? And please let me know if there's some debugging information I can provide to help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions