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

TarikAli's avatar

Change symlink when change deploy folder

Hello, i deployed laravel project as :

upload public folder to public_html folder

create folder out of public_html named lara_files

upload other files to lara_files

changed path in index.php as :

require __DIR__.'/../lara_files/vendor/autoload.php';

$app = require_once __DIR__.'/../lara_files/bootstrap/app.php';

and the project works

how can i change the paths to create symlink from lara_files\storage to public_html

Thanks

0 likes
4 replies
kiwi0134's avatar

The default skeletton assumes some default paths. Unless you want to go in and change that, upload your whole project in one to your hosting provider and ask them on how to change the DocumentRoot of the webserver to your public folder. Most hosting providers can change that for you or tell you how to do it on your own.

1 like
TarikAli's avatar

i found this solution :

in config\filesystems.php

    'links' => [
        // public_path('storage') => storage_path('app/public'),
        realpath(base_path().'/../public_html/').'/storage' => storage_path('app/public'),
    ],

Please or to participate in this conversation.