Deploy Laravel To Shared Hosting The Easy Way

Deploy Laravel To Shared Hosting The Easy Way



In this video I will show you how to easily deploy a Laravel application to a shared hosting account with InMotion hosting. We will deploy without having to type in one command. Everything will be done via Cpanel and FTP.

INMOTION HOSTING: Get an account for $5.99 per month

10 PROJECT LARAVEL COURSE: Please use affiliate link below

50% OFF: Use special code “traversy”

CODE: Complete Code For This Series

FULL SERIES:

SUPPORT: We spend massive amounts of time creating these free videos, please donate to show your support:

FOLLOW TRAVERSY MEDIA:

48 thoughts on “Deploy Laravel To Shared Hosting The Easy Way

  1. Thanks for that very helpful tutor.Then, how can we add new packages after first deployment.. I added laravel dompdf on local then uploaded related vendor files and config app for service provider but it didn't work. It gives serviceprovider couldn't found error when I try to open site. Besides I tried to run composer installation by using ssh connection to godaddy shared hosting, at that time it kills process while updating composer.json file..

  2. To deploy faster on a shared host with CPanel, one may upload a compressed file via the File Manager and decompress it from there.Thanks for the good Laravel series.

  3. For those who have problems creating the symlink using the method presented in the video, I suggest you to create a cronjob by going to the Advanced section of the cPanel -> Cron Jobs -> and adding a new one for the following command: ln -s /path/to/target /path/to/shortcut . Just don't forget to delete the job after creating the symlink. If you have SSH then just go ahead and use the same command directly.

  4. Traversy Media I love your videos, your explanations and your tutorials. You are my mentor in the world of web development as am new to it.

  5. Also worth a mention, when transferring files over, make sure all files locally including HIDDEN ones are visible and transferred or else 404 or 500 server error will occur, simple issue that can save you hours of time debugging lol

  6. shouldn't one "build" the laravel app before copying the files to the server? Im a beginner with laravel so its just a question. Great video btw!

  7. Hey, I have a question. For my laravel project I have been making use of a serverless database from sqlite. How do I make this into a mysql database?

  8. Very helpful for me as a new user of Laravel. I did also PHP front to back series before this which was very useful too. Thanks Brad. You are very generous.

  9. Solution for problem creating the storage symlink in shared hosting:

    1.Delete the storage folder in the public folder.

    2. Create symlink.php file contain this code:
    <?php

    // Create Symlink for laravel 7 in shared hosting script

    $docRoot = $_SERVER["DOCUMENT_ROOT"];
    $targetFolder = $root.'/lsapp/storage/app/public';
    $linkFolder = $root.'/storage';

    print $docRoot.'<br>';
    print $targetFolder.'<br>';
    print $linkFolder.'<br>';

    if (symlink($targetFolder,$linkFolder)) {
    echo 'success';
    } else {
    echo 'unsuccess';
    }

    3.Upload the symlink.php in the hosting and run it in browser & done.

    4.If the script return 'unsuccess', please make sure the $targetFolder and the $linkFolder path is correct.

  10. Thanks for your video, i followed everything and it worked like a charm. My application is built in laravel & vuejs. I have some questions, after i deploying my app to shared hosting and it is now up and running I need to update some codes in the frontend(vuejs), after reuploading the updated file, the changes did not take effect. Can you help me on this? I have no issue when I made changes & updates to .php laravel files. Your response is highly appreciated. Thanks

  11. For those who are in a hurry or who do not want to do the manipulations exposed in the video, use Laravel Deployer: https://www.laravel-deployer.com. It is a small php script that automates the deployment on shared or free hosting.

  12. Great video Brad. I like your wit. Plus the intro to Laravel was well explained, I wonder how to get rid of the grey Laravel Collective File Upload button…….

  13. Great video! I'm having an issue with the symlink though, its not creating the directory and I haven't got one already in the public_html. Would appreciate your help.

  14. Finally had the opportunity to deploy… was able to get everything going until trying to edit or delete post. Any advice?

  15. Thank you, thank you, thank you. I used this approach on a different shared hosting and it worked flawlessly. Thank you very much.

  16. If you want to send fast your laravel files to the server you can zip it and send to server. After that unzip on server will be very fast. In default you should have some zip software in server.

Leave a Reply

Your email address will not be published. Required fields are marked *