Just FYI, there are some good past post where I and others have explained how to correctly install laravel on hosting. I put main laravel out of web and point to public as document root.
But I suggest read some of the detailed past post.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
And now I want to host this on Cpanel but I'm facing a problem. I put the project in public_html and modified the urls in index.php.
This page isn’t working. subdomain.myDomain.com is currently unable to handle this request. HTTP ERROR 500
@jlrdw Thank you very much, but now my problem is solved I had problems with builds in the public/build directory I needed to run (npm run dev) But now I ran (npm run build) locally and copied the build directory from local to the server and it is working. I want to know if it is a good way to run the build? If there is another solution, please tell me
Please or to participate in this conversation.