Skip to content

Add SQLite compatibility to wp db commands #234

Open
@janw-me

Description

@janw-me

Describe the current, buggy behavior

Several wp db * commands don't work with sqlite.

SQLite is in testing fase

Describe how other contributors can replicate this bug

  • Install a new WP,
  • wp plugin install performance-lab --activate
  • In the performance-lab plugin settings activate the sqlite setting.
  • wp-content/databases/.ht.sqlite should exist.
  • wp db drop --yes the mysql gets dropped,
    This is fine for this test to make sure you don't read the mysql.
    But shouldn't it drop the sqlite file?
  • Click around in the admin/frontend. The website WordPress still works.
  • wp post list
    Shows the hello world
  • wp db query "SELECT * FROM wp_posts;"
    Gives an error.
  • wp db search 'hello'
    Does work, with a warning.

It appears wp-content/db.php doesn't get loaded.
I don't know when/where it should be included. And if it even would help.

Keep in mind, FQDBDIR and FQDB constants can be set to change the location & filename of the sqlite file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions