Php – SQLite unable to open database file: Laravel + Windows


I'm try use a sqlite database in my laravel project, in local environment for dev (Windows 8.1 with AMMPS), but when I try run a migrate:instal command, this error apeear:

SQLSTATE[HY000] [14] unable to open database file

My database config file (app/config/local/database.php):


return array(
    'default' => 'sqlite',

    'connections' => array(
        'sqlite' => array(
            'driver'   => 'sqlite',
            'database' => __DIR__ . '\..\..\database\production.sqlite',
            'prefix'   => '',

Best Solution

try to remove the DB_DATABASE="yourdatabase" variable in your .env file