How to Deploy Laravel on Shared Hosting in 12 minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.พ. 2025

ความคิดเห็น • 131

  • @rolandjethrosuyom478
    @rolandjethrosuyom478 ปีที่แล้ว +12

    Thanks sir, I spent a week to figure this out. You saved me. Salute to you sir.

  • @stockpedia_in
    @stockpedia_in 19 ชั่วโมงที่ผ่านมา +1

    Thank You So Much for this it really helped me. I have just deployed my first web app, all thanks to you.

  • @mohammedattar3628
    @mohammedattar3628 ปีที่แล้ว +7

    The idea of creating a symbolic link of public_html is live saving thanks 💙

  • @NeilMyatt
    @NeilMyatt 7 หลายเดือนก่อน

    Thank you sir! You save me a load of time messing around creating symlinks and failing to get it set up right

  • @D1N4N
    @D1N4N หลายเดือนก่อน +3

    Thank you! Did not know how to put a Laravel application on a shared hosting before. Only problem I had I could not use the Composer package mananer properly, so I installed NPM and Composer packages locally, zipped everything and moved it to the server. Not the best practice, but it worked for me. The symbolic link did not directly display the website for me, I guess this could differ from host to host (using another host than Hostinger). Instead, I had to select the "public" folder (with the .htaccess, robots.txt, index.php and more) as 'main folder'. This folder is used as the 'root' when a request is recieved. Option may could be found under webserver and domain related settings, but I think this also differs from host to host.
    A few configurations for the .env file:
    - Set the APP_DEBUG property to false - To reduce information shown in case of an error
    - APP_ENV to production instead of local - Extra security configurations.
    - APP_URL can be filled with the domain
    - As shown, database and mail configuration can be configured here as well.
    Some commands most of you probably know already:
    php artisan key:generate
    php artisan migrate - Had to add the "--force" flag since application was in production mode.
    php artisan storage:link - When the storage module is used.
    npm run build - To 'build' and optimize the projects's CSS and JS, the output of this is located in the "build" folder within the earlier mentioned "public" directory by default.
    It has been quite a comment, but hopefully someone is helped with it.

    • @TheCodeholic
      @TheCodeholic  หลายเดือนก่อน +1

      Thanks for your comment.
      Zipping everything is a solution, but not ideal, when you have updates you will trouble every time.
      If your server supports ssh try to deploy using github actions

  • @nilakash8430
    @nilakash8430 ปีที่แล้ว +8

    Great video! I've been struggling with deploying my Laravel project on shared hosting, but your tutorial made it seem so simple. The step-by-step instructions were easy to follow and the video quality was excellent. Thank you for taking the time to make this tutorial and helping us out. Keep up the good work!
    Would you please share us how to install Node and NPM

  • @kaveeshbhashitha7652
    @kaveeshbhashitha7652 11 หลายเดือนก่อน +1

    Very simple, very useful. Good job 👏

  • @TheCodeholic
    @TheCodeholic  2 ปีที่แล้ว +1

    🚀Get Shared Hosting for only $1.99 for a Limited time: hostinger.com/thecodeholic, and use coupon code "THECODEHOLIC" for EXTRA 10% 🚀

    • @caliplanet
      @caliplanet 4 หลายเดือนก่อน

      Thanks for the video - really grateful for the insights... especially the symbolic link! The minimum plan now is $2.99 with a 48 month contract only :/

    • @TheCodeholic
      @TheCodeholic  4 หลายเดือนก่อน

      @caliplanet 12 month plan also has 2.99

  • @wsqplm
    @wsqplm 2 ปีที่แล้ว

    Thank you, just got the 48 months Business Web Hosting plan using your code.

    • @TheCodeholic
      @TheCodeholic  2 ปีที่แล้ว +1

      You're welcome and good luck with your project deployment.
      That hosting will be enough for you for next 4 years. You can create 100 subdomains and 100 websites.

  • @LisandroDC
    @LisandroDC 2 หลายเดือนก่อน

    Sos el mejor, te adoro. Me salvaste, te quiero mucho señor

  • @mobilelegendsonly1
    @mobilelegendsonly1 4 หลายเดือนก่อน

    wait...can you make also tutorials how to add cron jobs in hostinger using laravel? because you're really good at explaining ☺️ hope this will get more demands

  • @matthewkk5087
    @matthewkk5087 ปีที่แล้ว +1

    შენი ვიდეოებიმაქვს ნანახი მემგონი აპოლო 11 ის არხიდან, მიხარია რომ ახალი გვერდი მოხოდე

  • @muhammadissasabbagh1540
    @muhammadissasabbagh1540 6 หลายเดือนก่อน

    Thanks a lot, I haven't found any solution for the composer version issue like yours, Great job

  • @BilalAmin-v5z
    @BilalAmin-v5z 8 หลายเดือนก่อน

    Thank you Zura, You are the best!

  • @marcello-sp
    @marcello-sp 2 ปีที่แล้ว +1

    You saved my life! THANK YOU!

  • @LeonelLopezBorbon
    @LeonelLopezBorbon 2 ปีที่แล้ว +1

    I bought this plan use your coupon! Thanks!!

    • @TheCodeholic
      @TheCodeholic  2 ปีที่แล้ว +1

      I think you got great deal.

  • @thahawahid6200
    @thahawahid6200 2 ปีที่แล้ว +3

    I generally FTP the whole thing. You just gave me a nice idea to symlink the public_html folder. Thanks :) Very helpful.
    Someday I will get to running npm commands right in hostinger.

    • @cank4286
      @cank4286 ปีที่แล้ว

      is ftping all things including vendor enough for deployment?

  • @ilyesmilyesm2576
    @ilyesmilyesm2576 ปีที่แล้ว +1

    Thank you so much this is very helpful !

  • @shbita
    @shbita ปีที่แล้ว +1

    great video , thanks man 🙏

  • @BobDoe_69
    @BobDoe_69 2 ปีที่แล้ว

    nice, basically for this to work the shared hosting company must have/provide ssh access

    • @TheCodeholic
      @TheCodeholic  2 ปีที่แล้ว +1

      In my opinion if shared hosting provider does not support SSH you shoul not take its hosting

  • @twicetherabbit
    @twicetherabbit ปีที่แล้ว

    Incredible video👏 Been struggling with the hosting until I watched your tutorial, and now I'm running my web app successfully. This really helps a lot, Thanks!

  • @kingsley.uchenna
    @kingsley.uchenna 2 ปีที่แล้ว +1

    Thank you for this video.

  • @skia515
    @skia515 11 หลายเดือนก่อน

    your videos are so usefull

  • @SYMONKALOLA
    @SYMONKALOLA 3 หลายเดือนก่อน +1

    thanks it worked...but images are not showing from local storage i dont know why

  • @zubairahmed6908
    @zubairahmed6908 2 หลายเดือนก่อน

    You made whole process complex

    • @TheCodeholic
      @TheCodeholic  2 หลายเดือนก่อน

      Please let me know easier way. I really want to learn as well

  • @alancarlosml
    @alancarlosml 2 ปีที่แล้ว +1

    Amazing!

  • @skykhanncanoeboy
    @skykhanncanoeboy 2 ปีที่แล้ว +1

    Thanks a lot! Just used your promo code ;)

  • @Umair_log
    @Umair_log ปีที่แล้ว

    my project was pending for a week. but now ❤

  • @YourVinayShukla
    @YourVinayShukla ปีที่แล้ว +1

    really helpful

  • @tvjmohan
    @tvjmohan 9 หลายเดือนก่อน

    Nice...
    Helped me

  • @raadkasem
    @raadkasem ปีที่แล้ว +1

    Thank you, Great video
    I need help please.
    How to run "Node" on Hostinger premium shared hosting?

    • @guilhermedinizl
      @guilhermedinizl ปีที่แล้ว

      I also would like to know. Did you find some way??

  • @DavideLobascio
    @DavideLobascio 9 หลายเดือนก่อน +3

    I have some questions...
    - How to correctly run a subdomain to make a test version of the project? I created a sub domain (hostinger create it in the public html), run the composer, key, db, migrations, env and all, but i get a 403 error.
    - On a share hosting is impossible to install node.js and run npm install?
    - On a share hosting does the auto-deploy from github works correctly? i have some issue about that

    • @JosephAli93
      @JosephAli93 3 หลายเดือนก่อน

      i got same exact issue any sloution ?

    • @JosephAli93
      @JosephAli93 3 หลายเดือนก่อน

      hmmm i swear i replayed to this :(,
      on hostinger while creating a new subdomain,
      1.check Custom folder for subdomain
      2. in the custom domain field enter foo/public. (instead of foo, insert your subdomain name).

  • @aldrinaureus7255
    @aldrinaureus7255 ปีที่แล้ว

    Hey thanks ! I used your video as a guide to create a github action to deploy my Laravel App on hostinger
    - i skipped the composer install part so i put the installation of laravel dependencies on github actions instead. Hostinger will only get all stuffs including vendor files

  • @Ethan_404
    @Ethan_404 2 ปีที่แล้ว +1

    Amazing sir... would u make another tutorial for the laravel staging site in that hostinger? Sry I'm not familiar with servers. Thanks 😍

    • @TheCodeholic
      @TheCodeholic  2 ปีที่แล้ว +1

      That's actually a really good idea.
      Having two subdomains:
      dev.laravel-example.com - for development
      staging.laravel-example.com - for staging
      Is that what you mean?

    • @Ethan_404
      @Ethan_404 2 ปีที่แล้ว

      @@TheCodeholic yeh sir exactly 🥰

    • @ysammo214
      @ysammo214 ปีที่แล้ว

      ​@@TheCodeholicdid you ever get around to doing this?

  • @danielsandnes6210
    @danielsandnes6210 9 หลายเดือนก่อน

    No idea if this is new, but Hostinger comes preinstalled with both composer 1 and composer 2, but to use the latter you need to use the composer2 command.

    • @TheCodeholic
      @TheCodeholic  9 หลายเดือนก่อน +1

      Thanks for the comment, I discovered this few months ago

  • @ahmadalharbi9097
    @ahmadalharbi9097 2 ปีที่แล้ว

    Thank you so much , just in time

  • @tharushafernando6688
    @tharushafernando6688 ปีที่แล้ว +1

    Is it possible to hots jetstream inertia project on shared hosting ?? I have seen many people saying its a bad practice to host jetstream inertia projects on shared hosting

  • @cristhianjhlcom
    @cristhianjhlcom 8 หลายเดือนก่อน

    Hello, I have a few questions what kind of projects do you recommend for sharing hosting? and you can use just one VPS service for multiples projects?

  • @prospertogether1791
    @prospertogether1791 ปีที่แล้ว

    you have composer 2 installed already. So you can just use composer2 as the command in place of composer e.g. composer2 install

    • @TheCodeholic
      @TheCodeholic  ปีที่แล้ว

      Really? Does command "composer2 install" work?

  • @balazsKelemenUK
    @balazsKelemenUK 6 หลายเดือนก่อน

    excellent content, what about if you have vite in your laravel app? how can I configure that, please?

    • @TheCodeholic
      @TheCodeholic  6 หลายเดือนก่อน

      Check deployment video from my playlist of building social media website

  • @Zabihullah_Danish
    @Zabihullah_Danish 2 ปีที่แล้ว +1

    Thanks great content really useful.

  • @Ролтун
    @Ролтун 2 ปีที่แล้ว

    I will see it in a future

  • @paul2DD
    @paul2DD 2 หลายเดือนก่อน

    Thanks alot, one more question, how do i keep the laravel queue worker running when i close the SSH connection?

    • @TheCodeholic
      @TheCodeholic  2 หลายเดือนก่อน

      You need to run your queue command in background. Try to find how to run scripts in linux in background

  • @wego-k4811
    @wego-k4811 ปีที่แล้ว

    I love this video. It was very helpful to me. But I tried creating a laravel project using Jetstream as the Auth package but I was unable to compile the js assets. Just wanted to know if there is a fix or should I do everything locally and just upload when it's done

    • @TheCodeholic
      @TheCodeholic  ปีที่แล้ว

      npm command is not available on shared hoasting, so you should build js files locally and upload them on server. You can commit these files on git as well

  • @giorgigeorge1003
    @giorgigeorge1003 2 ปีที่แล้ว +1

    Please make video about setup vps Ubuntu server with php, MySQL, Laravel and domain on vps server

    • @TheCodeholic
      @TheCodeholic  2 ปีที่แล้ว

      Thank you. That is in my plans.

    • @giorgigeorge1003
      @giorgigeorge1003 2 ปีที่แล้ว

      @@TheCodeholic please give me some good tutorial to set up vps server Ubuntu php MySQL Laravel and domain

    • @TechBuddy006
      @TechBuddy006 2 ปีที่แล้ว

      @@giorgigeorge1003 just use cloudpanel that's all you need.

  • @gurugaming5884
    @gurugaming5884 ปีที่แล้ว

    note: it only works with the main domain database and you have to update your main domain php version. I was trying to deploy it on a secondary domain on my shared web hosting but getting a php version error. Then I updated the main domain php version and it works. The same goes for database

  • @andrej513
    @andrej513 ปีที่แล้ว +3

    Hi, I did everything and my simple website is up and running. But how do I run npm install and npm run dev?

    • @gangnamman133
      @gangnamman133 ปีที่แล้ว

      Also wondering on this. Did you find anything out?

    • @andrej513
      @andrej513 ปีที่แล้ว +1

      @@gangnamman133 as I understood you can't do this on shared hosting, i just compile the css/js on my local and pull it on the server from my git repo

    • @samueluche5179
      @samueluche5179 หลายเดือนก่อน

      You do not need to run npm run dev in production environment. 😊

  • @khanaqib7871
    @khanaqib7871 8 หลายเดือนก่อน

    can u plz confirm when we build asset using vite the styles are not loaded. the build folder is also present in public/html
    in localhost its working fine but on remote css showing not found

  • @kifaru.
    @kifaru. 8 หลายเดือนก่อน

    can you make a tutorial on how to install multiple laravel website on subdomain with hostiger

  • @Roman112100
    @Roman112100 5 หลายเดือนก่อน

    God Bless you!

  • @ahmedmohamed1642
    @ahmedmohamed1642 ปีที่แล้ว

    thanks you - what if i want to deploy on subdomain ?

  • @khayriesports2754
    @khayriesports2754 ปีที่แล้ว +2

    How can we update our website whenever theres a new code? Thanks!

    • @TheCodeholic
      @TheCodeholic  ปีที่แล้ว +2

      You need to login via ssh, navigate into projects root folder and run git pull

  • @samueluche5179
    @samueluche5179 หลายเดือนก่อน

    Zura, shared hosting on hostinger does not support php artisan storage when run with ssh, and the symbolic link does not fetch my images in production, the images display on development only. What do I do?

    • @TheCodeholic
      @TheCodeholic  หลายเดือนก่อน

      php artisan storage:link should work on shared hosting as well.
      And images should be displayed on production as well. Try to clear cache.
      What error do you get in browser console? It is possible you just need to debug the problems

  • @razvanpreda5841
    @razvanpreda5841 ปีที่แล้ว +1

    Why not which composer? Hostinger has a symlink to composer2 :)

  • @coddingmall3477
    @coddingmall3477 2 ปีที่แล้ว +1

    Kindly do a video hosting in a vps too

    • @TheCodeholic
      @TheCodeholic  2 ปีที่แล้ว

      I think I will make it.

    • @coddingmall3477
      @coddingmall3477 2 ปีที่แล้ว

      @@TheCodeholic thanks you again and again.Have just bought ur vue and Laravel e-commerce course.Thanks again for the offer

  • @ahmedmissaoui907
    @ahmedmissaoui907 ปีที่แล้ว

    Great video , but i still have a problem , after following all your steps , i still get 404 not found instead of my site content, what to do in this case ?

  • @cvairlis
    @cvairlis ปีที่แล้ว +2

    I am the first who clicked the laravel-example domain? It redirects to TH-cam `Rick Astley - Never Gonna Give You Up (Official Music Video)` Oh my god. Thank for your video.

  • @peterchisangamwamba9100
    @peterchisangamwamba9100 ปีที่แล้ว

    Can you make or do you have a video on how to intergrate a payment system like Stripe into a Laravel appliication?

  • @lindanidube5654
    @lindanidube5654 9 หลายเดือนก่อน +3

    I thought it was going to be easy

  • @TechBuddy006
    @TechBuddy006 2 ปีที่แล้ว

    Can you show load tests with 100s of products or blogs within the same hosting.

    • @TheCodeholic
      @TheCodeholic  2 ปีที่แล้ว

      Hundreds of records will not be a problem I think.
      Even thousands will not be a problem. The problem will be if thousands of users access the website at the same time.

  • @narebinhaa
    @narebinhaa ปีที่แล้ว

    Is it possible to deploy a monorepo Laravel + React in the Shared Hosting? I don`t know much about Lavarel but I already have a React frontend app. And Laravel seems to be a good option to build a monorepo with React.

  • @shashanksrivastava5560
    @shashanksrivastava5560 11 หลายเดือนก่อน

    thanks for this but the problem is the routes are not working as it says 403

  • @NIKHILSCI-t3g
    @NIKHILSCI-t3g 7 หลายเดือนก่อน

    have you any idea for use mongodb with laravel 11? if yes then guide me

  • @midnightlady4711
    @midnightlady4711 หลายเดือนก่อน

    The tutorial does not work with the recommended Hostinger package. By default, Hostinger still uses Composer version 1 - there is a workaround for this in the tutorial - however, the package does not support Node, so you cannot proceed further. Nevertheless, the tutorial gives you a first idea of how to install Laravel on a shared host. Thank you for that.

  • @TarekFellah
    @TarekFellah 6 หลายเดือนก่อน

    Should i change APP_URL to the used domain URL?

  • @ahmadfraz5846
    @ahmadfraz5846 9 หลายเดือนก่อน

    how do you run "npm run prod
    " for frontend css compilation?

  • @GardeningWithSteve
    @GardeningWithSteve 9 หลายเดือนก่อน

    Artisan command not executing on server - any ideas? rwxr-xr-x artisan

  • @thaisontinh7911
    @thaisontinh7911 3 หลายเดือนก่อน

    Can I use rachet on shared hosting?

  • @PraveenPatelDev
    @PraveenPatelDev 4 หลายเดือนก่อน

    Storage linking is not working in Premium Hosting plan.

    • @TheCodeholic
      @TheCodeholic  4 หลายเดือนก่อน

      Can you share error image?

  • @JACKoPL
    @JACKoPL 2 ปีที่แล้ว

    And now... how update site on shared hosting, adding aliases, override default composer... ;)

    • @TheCodeholic
      @TheCodeholic  2 ปีที่แล้ว

      As far as you have access to SSH, every step will be exactly as it is on local environment.
      To pull the latest changes - "git pull"
      To run composer commands - "php ~/composer.phar [COMMAND_NAME]"
      To run artisan commands "php artisan [COMMAND_NAME]"
      What do you exactly mean in "Adding aliases" or "Override default composer"?

    • @JACKoPL
      @JACKoPL 2 ปีที่แล้ว

      @@TheCodeholic I haven't checked (tested) for a long time, but I think caused a problem with composer.json-lock. Maybe I should give him to .gitignore. I had to delete the vendor catalog and again . Maybe it also depends on the hosting. As for composer, the composer ", not php ~/composer.phar normally writes locally. For me in /home/nick/.bashrc I have a line . And as we talk about the alias, it is the abbreviation . Translated by Uncle G ;)

    • @TheCodeholic
      @TheCodeholic  2 ปีที่แล้ว +1

      git pull will cause problems if you have composer-lock.json modified locally and that you run git pull which tries to pull also modified composer-lock.json file. On the hosting you won't have this problem because you are not going to modify composer-lock.json file on server. As for the aliases: If you are going to create that in your .bashrc file that should work. But that really depends on OS and some configurations as well.

  • @romeoshams7932
    @romeoshams7932 4 หลายเดือนก่อน

    Im having a error doing storage:link. Anyone knows how to fix it?

    • @TheCodeholic
      @TheCodeholic  4 หลายเดือนก่อน

      Can u share the error stack?

  • @abela801
    @abela801 4 หลายเดือนก่อน

    can you show us how to deploy on cpanel

  • @veenitchauhan6131
    @veenitchauhan6131 ปีที่แล้ว

    403
    Forbidden
    Access to this resource on the server is denied!

  • @julianadelosrios9876
    @julianadelosrios9876 ปีที่แล้ว

    and now how i edit the front page

    • @TheCodeholic
      @TheCodeholic  ปีที่แล้ว

      Like you normally would do in your project.
      Edit, commit and push, then pull on server.

  • @Gift-op6mq
    @Gift-op6mq 8 หลายเดือนก่อน

    What about deploy on aws

  • @jhumerapus1881
    @jhumerapus1881 ปีที่แล้ว

    hi how can i paste it? hehe

  • @tarunkumardewangan4239
    @tarunkumardewangan4239 9 หลายเดือนก่อน

    laravel next js and mysql deploy please

  • @plombir4964
    @plombir4964 2 ปีที่แล้ว

    What about npm run build?

  • @hoketero
    @hoketero ปีที่แล้ว

    Did anyone else got rickroll'd? >.>

    • @TheCodeholic
      @TheCodeholic  ปีที่แล้ว

      Do you have any issues? Maybe I can help?

  • @gorr9737
    @gorr9737 2 หลายเดือนก่อน

    how to run a worker

  • @lawenforcer-niel
    @lawenforcer-niel ปีที่แล้ว

    You make it very complicated for those panel..

  • @ricko13
    @ricko13 4 หลายเดือนก่อน

    2024-Oct-02

  • @constantine9074
    @constantine9074 ปีที่แล้ว

    ისე ვეღარ გავიგე ზურა გქვია თუ გიო.. ვიდეო ძაან კაია

    • @TheCodeholic
      @TheCodeholic  ปีที่แล้ว

      ზურა მქვია. გიო რატო გეგონა?

    • @constantine9074
      @constantine9074 ปีที่แล้ว

      @@TheCodeholic მეორე არხიც ხო გაქ program with gio..

    • @TheCodeholic
      @TheCodeholic  ปีที่แล้ว +1

      ეგ არაა ჩემი არხი

  • @Mr.Rojer.
    @Mr.Rojer. 7 วันที่ผ่านมา +1

    You save my life. Thanks a lot!