How to Fix Laravel Route Cache Issues on Shared Hosting (Without SSH)

Laravel is an amazing framework — but like any powerful tool, it can sometimes be a bit tricky. One common problem developers face when deploying Laravel apps on shared hosting is the cached routes issue. Specifically, when you update or remove routes in web.php but still see the old ones in action, it can leave you scratching your head.
If you’ve ever encountered this frustration, don’t worry. You’re not alone. In this post, I’ll guide you step-by-step on how to clear cached routes when you can’t use SSH, so you can finally get your changes live without the hassle.
The Issue: Cached Routes That Won’t Go Away
So, you’ve made some changes to your routes in web.php file and even deleted routes, but when you visit your site, the old routes still work. If you’ve tried to clear the cache via SSH or Artisan commands and nothing seems to work — this is the guide for you. You’re likely dealing with Laravel's route cache files that haven’t cleared out properly, and on shared hosting, without SSH access, this can be a bit tricky.
Don’t worry though, we’ve got an easy fix that doesn’t require SSH. You can manually clear the cache via your hosting provider’s File Manager, which is available in any shared hosting plan.
Step 1: Access Your Shared Hosting File Manager
-
Log into your hosting control panel.
-
Locate and open the File Manager. This is where you can manage all your project files on your hosting server.
-
Navigate to your Laravel project directory (usually located in public_html or a subfolder).
Step 2: Delete Cache Files in the bootstrap/cache Folder
Laravel stores its route and config cache files in the bootstrap/cache directory. To clear the cache, follow these steps:
-
Go to this directory:
/public_html/bootstrap/cache/
-
You’ll see several cached files here. Delete these cached files:
-
routes.php
-
config.php
-
services.php
-
packages.php
-
These files store your cached routes and configuration, and deleting them will force Laravel to regenerate them.
Step 2: Clear Cache Files in storage/framework Directory (Optional)
If the above step doesn’t solve the issue, we can go deeper. Sometimes, other cache files in the storage/framework directory can cause problems. Here’s how you clear them:
Navigate to:
/public_html/storage/framework/
-
Inside the framework folder, open the cache/ folder and delete everything inside.
-
Also, open the views/ folder and delete all the files inside. Don’t delete the folders — just the files.
This will clear any cached views and framework-related data that could be preventing the proper update of your routes.
Step 4: Refresh Your Site
Now that you've manually cleared the cached route files:
-
Go back to your browser.
-
Refresh the page or press Ctrl + Shift + R to force a hard refresh (to clear any cached browser data).
-
Visit your updated route and now the old routes should no longer appear.
You should now see the 404 page (if you’ve removed the routes), meaning everything worked perfectly!
Why Does This Happen?
When you make changes to routes or configuration files, Laravel stores these changes in a cache for performance. This makes your application run faster, but sometimes Laravel doesn’t automatically clear the cache on shared hosting when changes are made.
While Artisan commands like php artisan route:clear
would usually solve this problem, shared hosting environments often don’t provide SSH access or the ability to run these commands directly. That’s where this manual method comes in handy.
Conclusion
If you're facing Laravel route cache issues on shared hosting and don't have SSH access, manually clearing the cache is the solution. Simply delete the cached files from the bootstrap/cache and storage/framework directories, refresh your site, and the changes should take effect. This process ensures that your Laravel routes and configuration files are properly cleared without the need for Artisan commands.