How To Enable SQLite3 on Windows, Linux, Mac OS X

This post guides you how to enable/install SQLite3 on Windows (XAMPP, WAMP, etc.), Linux, and Mac OS X.


1. Windows

– Frist, open your php.ini file. You can find it within your web server folder or via its application GUI, for example:

  • XAMPP: C:\xampp\php\php.ini
  • WAMP: C:\wamp64\bin\apache\apache2.4.27\bin\php.ini

– Then find and change the following:


to (removed ;)



2. Linux

  • For PHP 5
apt-get install php5-sqlite


  • For PHP 7
apt-get install php7.0-sqlite


3. Mac OS X

  • For PHP 5
sudo port install php5-sqlite


  • For PHP 7
sudo port install php7.0-sqlite

Finally, restart your web server.

Notify of
1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
Emmanuel Odero
Emmanuel Odero
2 years ago

For those using windows;
Navigate to the php.ini file(-C:\php\php.ini)
Enable the following:
;extension=pdo_sqlite by removing the /;/ should look like this extension=pdo_sqlite
;extension=sqlite3 should be extension=sqlite3 without the ; symbol

Would love your thoughts, please comment.x