Twitter

How To Install Laravel Breeze on a Shared Hosting Account

by Adam Patel

black laptop computer turned on displaying blue screen

If you’re building a web app, the chances are you want user registration and authentication so that users of your app can have their own user accounts. Laravel 8 makes this easy – sort of – by giving you starter kits. It took me quite a while to figure out how exactly to use these, but here’s what you do to make breeze work on shared hosting.

Open the terminal in cPanel and navigate to the root directory of your laravel app. Once you’re there, it only takes two commands to install it.

The first line is this…

composer require laravel/breeze --dev

Then, you want this command…

php artisan breeze:install

This takes a bit of time, but when it’s finished, you’ll eventually get instructions to run an npm command in order to complete the process. You’ll then probably realise (I did) that npm is not available on shared hosting accounts.

However, I found that all the necessary files are created ANYWAY – without running any further commands.

If you now navigate in your browser to yourdomain.com/login, there will indeed be a page there.

Copyright 2021. All Rights Reserved. Adam Patel