Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

____wahed____'s avatar

Upload laravel project + inertia react to cpanel

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

0 likes
5 replies
jlrdw's avatar

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.

2 likes
____wahed____'s avatar
____wahed____
OP
Best Answer
Level 1

@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

jlrdw's avatar

@wahed either the way you did it or ssh in and do what's needed.

The main thing is make sure folder structures are correctly set up to avoid any security problems.

2 likes
jlrdw's avatar

@wahed glad you got it solved.

3 likes

Please or to participate in this conversation.