Adding a sqlite3 database in Windows

Edit your php.ini

Uncomment in php.ini by removing the semi-colon ‘;’ :

extension=php_sqlite3.dll

Save and restart your apache.

Some tutorials mention also adding:
extension=php_pdo.dll

But this didn’t work for me.

If you receive the error:

PHP Startup: Unable to load dynamic library ‘C:\xampp\php\ext\php_pdo.dll’ – The specified module could not be found.

Just comment out the ddl:

;extension=php_pdo.dll

Adding the sqlite3 database

Go to the folder you would like to add your sqlite database, then run

sqlite3

Make sure that the location of where your sqlite3 executable is located is added in your environment variables.

Which will start an sqlite3 interface up. In there type:

.open database.sqlite

With ‘database.sqlite’ being your database file name. Make it whatever you would like it to be.

To exit the interface click “ctrl + c”.

Now you will see a newly created file in your directory.