Skip to content

Instantly share code, notes, and snippets.

@samalapsy
Last active June 23, 2019 19:48
Show Gist options
  • Select an option

  • Save samalapsy/7431b656cf32c85037effe1a2e36fc4a to your computer and use it in GitHub Desktop.

Select an option

Save samalapsy/7431b656cf32c85037effe1a2e36fc4a to your computer and use it in GitHub Desktop.
Creating a symm link of laravel storage folder in public_html on shared hosting
This is to show how to create shortcut from your laravel storage folder into your public folder. The simlest way to get this done is to write a cron job having this command
First Note that you laravel folder must be in the root path
If this main public_html is your main website folder
STEP 1
Set the cron job to run time to be * * * * *,
STEP 2
Set the cron job to run time to be * * * * *,
ln -s /home/usernanme/laravelfolder/storage/app/public/ /home/userame/public_html/storage
If this main public_html is not your main website folder
STEP 1
Set the cron job to run time to be * * * * *
STEP 2
Add this cron script *ln -s /home/usernanme/laravelfolder/storage/app/public/ /home/userame/public_html/example.com/storage*
This would create a shortcut of the Laravel's storage/app/public folder on your public folder. Check your public folder and
if you see a storage folder in your public_html folder, then it worked find. Don't forget to delete the cron job created to carry
out this action.
Thank You
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment