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

kenprogrammer's avatar

Install laravel ui on shared hosting

In order to use the Auth::routes() method, please install the laravel/ui package

I've a laravel 7 project on shared hosting(No SSH access). I've installed the package locally on dev and uploaded the vendor files via FTP. When I try to access the website i get the above error. The error will only go away if I comment out the auth routes but now i cannot login or register.

NB: This is a fresh Laravel 7 installation. Upgraded projects e.g. from 5.8 or 6 to 7 have no problem.

What's the possible workaround?

0 likes
9 replies
Wakanda's avatar

run composer update on local then npm update the npm run production then zip your files and upload again then unzip once that is done

kenprogrammer's avatar

Still the problem persisted even after uploading the files. I resulted to creating a custom authentication.

kenprogrammer's avatar

@EkoSyahputra Since you can't run CLI commands on shared hosting, you have to use Artisan::call() to run these commands via routes/http

EkoSyahputra's avatar

@kenprogrammer yup I use that too for migration, but for upgrade laravel vers 5.8 -> 6 -> 7 I usually upgrade on my local first then just upload whole vendor folder and the other related changes for upgrading

1 like
mrkoopie's avatar

The post is a year old :-) But if anyone finds this issue, check if opcache is enabled. It may cause some issues when deploying now code.

That said, there are plenty of shared hosts who do offer SSH access, even cheap ones. It could save you the hassle next time.

kenprogrammer's avatar

@mrkoopie In a VPS you can but shared hosting even the provider cannot change php.ini because it will affect the whole hosting

mrkoopie's avatar

@kenprogrammer Sorry for the late reply. But we offer our clients that very option. You can configure the modules you want, the PHP version you want and a number of settings that are usually not changeable. Much has changed in the shared hosting world :-)

Please or to participate in this conversation.