Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Krad's avatar
Level 1

Error when deploying to Heroku w. SQLite

Hi, I am trying to deploy to heroku with sqlite.

The error I get is:

InvalidArgumentException in SQLiteConnector.php line 34:
Database (database.sqlite) does not exist.

I did remove *.sqlite from the .gitignore and pushed it. But I do not know what to try next, and I was unable to find any further info on Herok or Stackoverflow.

I was also able to go into Heroku settings and add under Config Variables DB_DATABASE ../database/database.sqlite

So now my error is:

PDOException in Connector.php line 55:
could not find driver

Thank you in advance for your help!

0 likes
4 replies
ndlinh's avatar

You must add ext-pdo_sqlite

to composer.json like this:

"require": {
        "php": ">=5.5.9",
        "laravel/lumen-framework": "5.2.*",
        "vlucas/phpdotenv": "~2.2",
        "ext-pdo_sqlite": "*"
    },

Then run composer update. After that commit and push new source to Heroku.

1 like
ttimot24's avatar

I get this error too, is there a solution?

Alexander Horner's avatar

I also get this error. Very weird. Does any pro have experience with this?

Please or to participate in this conversation.