Laravel .env file config


I know it’s not ideal to use this type of hosting for a Laravel project but you are perfect for dev purposes.

I’ve got a Laravel project up and running but cant seem to config my .env file so the app can find the database file - I’m using sqlite and the database file is /htdocs/database/database.sqlite

Ive tried every permutation and combination I can think of before contacting you but Im still getting an error when the app tries to access the dbase (homepage etc works fine)

heres my .env:





and heres the error
Database (./databsae/database.sqlite) does not exist. (SQL: PRAGMA foreign_keys = ON;)

Pleeeeese! Hope you can help.

Hello! Your database host is not, is is in the form of, You can find it in the client area (

@HaydenANG You are correct if he used MySQL DB. But he is using SQLite DB.

@rubbishkissbox See again your config.
Does ./databsae/ folder (not ./database/) really exist?

1 Like

Wow! That was a seriously quick response! Thanks!

I’m not using mysql tho, I’m using sqlite.

Any ideas what settings I need to use?

Typo, sorry ./database/database.sqlite

Oops didn’t see that :rofl:, And i checked;

SQLite is available on all services though. Our servers have the PDO drivers for SQLite installed, so you can use SQLite from PHP. Since SQLite is just a file which can be placed anywhere, you can create a SQLite database in whatever way you want and then upload the database file to your hosting account using FTP or a file manager.

This shows it is supported, but all i can suggest is double triple checking, it doesn’t exist, and I get 404, maybe it is trying root directory?

So, the path is correct, but still getting error?

Fixed the typo, still giving same error.

Pleese help, I’m going mad!

The root of the path must be wrong I think. It works on my localhost

I have noticed, that /database, goes to /public/database, could that be it?

You’re an effin’ star HaydenANG


How did you trace that?

IDK, Just searched it


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.