Martynas Jakas
Martynas Jakas

Reputation: 89

Wordpress php sqlite can't connect to .db

I am trying to connect to sqlite 3 .db.

$db = new SQLite3('path/to/db.db');

This gives me Fatal error: Uncaught exception 'Exception' with message 'Unable to open database: unable to open database file. Does it have something to do with php.ini? I read that i need to change permissions or something but didn't manage to do that. Also I am developing a web with Wordpress. Maybe I need to install sqlite or something, but how? Thanks.

Upvotes: 1

Views: 247

Answers (1)

Alex
Alex

Reputation: 38519

Wordpress only supports MySQL.
There's an extension that supposedly supports Sqlite, but I've not personally used it, nor would I - https://wordpress.org/plugins/sqlite-integration/

Sometimes, just because you can, doesn't mean you should.

Upvotes: 1

Related Questions