skip to Main Content

I uploaded my project to cpanel. and I put the file in the public folder on home/user/public_html. and others in the home/user/laravel folder

in public_html I have a storage folder.
but the file that I uploaded goes to home/user/laravel/storage
and symlink need folder public in home/user/laravel/

I don’t really understand this filesystem

2

Answers


  1. Try this:

    For Laravel 5.8

    Step 1: Access the public directory of your project public_html

    Step 2: Change the name to the folder called Storage by Storage2

    Step 3: Open the index.php file

    Step 4: Change require __DIR__.'/../vendor/autoload.php'; for require __DIR__.'/../YOURFOLDERNAME/vendor/autoload.php';

    Step 5: Change $app = require_once __DIR__.'/../bootstrap/app.php'; for $app = require_once __DIR__.'/../YOURFOLDERNAME/bootstrap/app.php';

    Step 6: Now you need to create a new file on public_html called link.php

    Step 7: Add the following code to the file link.php

    <?php 
    symlink('/home/**server_directory**/**YOURFOLDERNAME**/storage/app/public','/home/**server_directory**/public_html/storage');
    

    Step 8: Visit yourwebsite.com/link.php

    You will see a blank page

    Step 9: Go back to the administrative panel of Voyager and click on the “Fix it” button

    Step 10: Delete link.php file from your server.

    This worked for me, I hope it works for you too. Regards!

    Login or Signup to reply.
  2. I had the same problem and it turned out that I didn’t have a “public” folder in the original “storage” folder like: “storage / app / public”

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search