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

Kusanagi's avatar

Deploy laravel project to web server

Hello, I have a laravel project (Laravel Framework 8.31.0 ) on my PC and I wanted to upload it to my web hosting server. I followed the steps on this video ( https://www.youtube.com/watch?v=BHAdDFtgYo0&t=535s ) But when I open my website, the page is blank. What could be the problem ?

0 likes
8 replies
martinbean's avatar

What could be the problem ?

@kusanagi It could be a number of things.

Check you’ve uploaded the files to the right directory. Check your Apache/nginx server is set up correctly. Check your server’s error log.

Kusanagi's avatar

@martinbean Hi, thank you for taking some time to help me. how can I check if my Apache/nginx server is set up correctly ?

for more informations :

I now did the following : I uploaded the my project in public_html then I added a .htaccess containing :

RewriteEngine On
RewriteRule ^(.*)$ public/ [L]
</IfModule> ```

When I call my web page it stays blank. 
I added echo("test") in index.php and that got shown.

but even the simplest request such as : 

Route::get( '/', function() { return 'Hello world'; });

don`t work. 
I even miss configured .env to see if I get an error but no
Tray2's avatar

If you are using Apache2 make sure you have run sudo a2enmod rewrite

Tray2's avatar

I don't use cPanel so I don't know. I would just ssh into the server.

jlrdw's avatar

See my reply in your other post about setting up correctly.

jurerick's avatar

Check your log files inside storage directory. There might some error messages on it.

nmtechnology's avatar

I have the same problem, although in my situation my welcome page only loads and then my links to the other blades gives me a "page not found" message on the browser screen.

When I was in development and viewing my website using Valet everything worked fine, all the links to my other blades/pages work fine until it is on my server, then only the welcome page loads.

I have tried to use the php artisan view:clear and then view:cache to clear out my previous cache and then cache my new blade views but still does not link to the other blades. I thought it was a permission thing and tried to change permissions and that does not resolve the issue either. I am out of options.

Please or to participate in this conversation.