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

drewkovihair's avatar

Failed deploy when missing database.sqlite even when using MySql.

I have having an odd issue that recently started happening.

Background on issue: We are running Laravel via Caprover. Everything has been working flawlessly. We connected CapRover to our GitHUb to auto deploy when we push to main. Great, everything has been working!

The issue: Recently we have been pushing commits and the caprover server will start the building process on the new GitHub commit. But when it reaches this line:

INFO Clearing cached bootstrap files. cache ......................................................... 11.65ms FAIL

with this error:

In Connection.php line 813:

Database file at path [/var/www/html/database/database.sqlite] does not exi st. Ensure this is an absolute path to the database. (Connection: sqlite, SQL: delete from:cache) In SQLiteConnector.php line 34:

Database file at path [/var/www/html/database/database.sqlite] does not exist. Ensure this is an absolute path to the database.

Which is weird because all of my settings in my .env are correctly setup to use mysql and not sqlite. It only works when we include the initial database.sqlite file that was created when we first initialized the laravel app. When this file is removed from the .gitignore in the database folder, it works successfully.

This is also my first laravel app, so I do know that I migrated to mysql with aartisan commands.

0 likes
2 replies
jlrdw's avatar

You may need to clear your config cache.

1 like

Please or to participate in this conversation.