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

LordRaiders's avatar

Error 500 when uploading Laravel project to server,

When I upload my Laravel project to my server I get a 500 error (internal server error). I've installed it this way:

  • Change the database connection from local to the servers database
  • Export the local database to the server
  • Copy paste the project to /public_html

On Localhost everything works fine and even a clean install of Laravel doesn't work. In DirectAdmin I can install Laravel with the "Installtron installer" but that is a new project in Laravel 5.1.11 instead of my own project made in Laravel 5.3 .

I have no error logs when I go to the server logs or in my /storage/logs folder.

Is there something I do wrong when I install my project to the server?

I hope someone knows a solution. Thanks!

0 likes
10 replies
LordRaiders's avatar

@tisuchi It still doesn't work! What I did:

In the folder {domain}/public_html I've put all the files from the public folder.

In the {domain} folder I made a new folder called: Laravel and I put all the files except the public folder here.

In the index.php I changed the url from: /..//bootstrap/autoload.php'; to: /../Laravel/bootstrap/autoload.php';

Everything should be good now right? I'm very new with Laravel so I've no experience yet. With websites in the past it was just: Drop all your files in public_html and it should be fine :P

tisuchi's avatar

@LordRaiders

The video I have given to you should work. All of my laravel projects are uploaded like that way... and these are working fine.

Make sure index.php file has pointing the right path.

By the way, uploading laravel project in cpanel is bit tricky.

Can you show what kind of error you are finding now?

LordRaiders's avatar

@tisuchi I'm uploading it in DirectAdmin but I think that works the same! I'm sure that the path is right.

The error is a 500 error and the error log says nothing.

tisuchi's avatar

well... Error 500 means that you did something wrong...

Check it out in google chrome developers network tab..

LordRaiders's avatar

The console in Chrome says: "Failed to load resource: the server responded with a status of 500 (Internal Server Error)"

Is it possible that I have something wrong in the .htaccess file that is in the public folder?

Options -MultiViews

RewriteEngine On

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Snapey's avatar

if you are getting 500 error and no log file is created then it's very likely that the storage folder is not writeable. Check the permissions.

LordRaiders's avatar

Hmm I downloaded those files from internet and put it on my server and it seem to work... But when I replace it for my own files I still get the error: https://github.com/teckwei1993/laravel-in-directadmin

But I've changed the permissions for the storage folder and now it seems to work. A file called "laravel.log" appeared and it says:

[2016-09-10 23:23:46] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'Illuminate\Notifications\NotificationServiceProvider' not found' in /home/nieckki171/domains/{{domain}}/laravel/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:146 Stack trace: #0 {main}

Please or to participate in this conversation.