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

vincecarterbg@gmail.com's avatar

Upload laravel project to shared hosting issue

i have uploaded my laravel project to a shared hosting server, but i have problem to run it. First i will let you know, how i have uploaded it and than i will inform you about the errors i get.

Before i uploaded the files, i ran: "composer dump-autoload"

The laravel core files are located in the root as follows:

etc/ laravel/ app/ ... public_html/ i have created a subdomain for this project and the public folder is located inside the public_html, inside the subdomain folder:

public_html/subdomain/ public/ In the config/app.php i have changed the url to the new subdomain url. Than in the public/ folder i have changed the both paths of index.php. Next step was to upload the database and to change the settings of .env file.

When i call the website i get the following error:

ErrorException in FileViewFinder.php line 137: View [layouts.front] not found. (View: /home/bgfreela/laravel/resources/views/front/index/show.blade.php) I have double checked and the file is there. I tried to call other page of my website and there i get other error:

FatalErrorException in AuthServiceProvider.php line 41: Class 'Illuminate\Auth\AuthManager' not found What am i doing wrong ?

0 likes
15 replies
vincecarterbg@gmail.com's avatar

Hi jlrdw,

have u read my whole problem ? Unfortunately i dont find anything useful from both links u gave me. :(

vincecarterbg@gmail.com's avatar

Hi Snapey,

i have made the same things as you are writing in your blog, but i still get this error:

FatalErrorException in AuthServiceProvider.php line 42: Class 'Illuminate\Auth\AuthManager' not found

I have tried to include that class, but the error still appears

Snapey's avatar

Check the case of the filenames. Its not uncommon to have a local development environment where case does not matter, and then when you upload to a system that is case sensitive, files are 'missing'.

@jlrdw best to keep the site and framework out of the public space else you risk security issues.

vincecarterbg@gmail.com's avatar

Unfortunately this 'Illuminate\Auth\AuthManager' i have never used. It is used in the 'Illuminate/Auth/AuthServiceProvider.php', but there i have never made any changes.

Could "composer global update" change anything to my local project and then to upload it to the webserver ?

Gerard's avatar

In your FileViewFinder.php at line 137 you are calling a view named 'layouts.front'?

The error gives this path /home/bgfreela/laravel/resources/views/front/index/show.blade.php with which I understand layouts.front is a directory, not a view. You shouldn't call 'layouts.front.index.show' instead?

jlrdw's avatar

Have you properly resolved your paths?

jlrdw's avatar

Did I misunderstand you did you actually have Part of laravel installed on a domain and another part in a subdomain? It would be so much easier on you if you put the whole thing in the subdomain, you can still put the main files higher than public for safety but again I may have misunderstood you.
If you follow the steps that @Qlic gave it works.

vincecarterbg@gmail.com's avatar

The laravel core (everything except the public folder) is in the root (on the same level as public_html) of my web server. Everything from the public folder i have put in the subdomain folder (public_html/subdomain). I hade problems, that some of my views were in the public folder, thats why came the error : ErrorException in FileViewFinder.php line 137: View [layouts.front] not found. But i moved these files to the laravel resources, so that error disappear, but i still get the error: Class 'Illuminate\Auth\AuthManager' not found, which is very strange for me.

Snapey's avatar

The laravel core (everything except the public folder) is in the root (on the same level as public_html) of my web server.

... then you have not followed the structure I suggested in my article. You will therefore have issues such as mentioned, in addition if you are using .env file someone can just go to yoursite.com/.env and see all your settings.

vincecarterbg@gmail.com's avatar

No, there is no such danger. The .env file is not in the public_html folder, it is one level above. Maybe i was not very

etc/ laravel/ public_html/ .env

Please or to participate in this conversation.