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.