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

alifallahrn's avatar

Filament 404 error on Cpanel shared host

Hi there,

My project was functioning correctly on my local environment, but when I deployed it on the Cpanel shared host, the /admin page was giving a 404 error.

I realized that it wasn't detecting the service providers (as I had experienced in previous projects).

So, I added these service providers to the list of providers in the config/app.php file:

Filament\FilamentServiceProvider::class,
Filament\Forms\FormsServiceProvider::class,
Filament\Tables\TablesServiceProvider::class,
Filament\Widgets\WidgetsServiceProvider::class,
Filament\Support\SupportServiceProvider::class,
Filament\Actions\ActionsServiceProvider::class,
Filament\Infolists\InfolistsServiceProvider::class,
Filament\Notifications\NotificationsServiceProvider::class,

After doing that, the 404 error was resolved, but I encountered a 500 error, and I've attached its image.

Could you please guide me on how to proceed?

Thanks Ali

0 likes
3 replies
networker's avatar

Pls I am also facing the same problem. Do I have to pasting the code in the app.php everytime. My serve is ubuntu 20, I am using aapanel for server management.

Dave Wize's avatar

Have you run npm run build? It is an obvious step but might be missed. Small tip: change debug in .env to true for a moment so you can read the error...

afshar_mn's avatar

if you have same problem do this :

add this route :

Route::get('/clear-cache', function() {
    \Illuminate\Support\Facades\Artisan::call('optimize:clear');
});

then open the route domain/clear-cache

i will be ok

1 like

Please or to participate in this conversation.