php artisan serve not working

2024-04-27 06:50:10 Lovely Laravel

How to fix php artisan serve not working ?

Reasons why php artisan serve not working

  1. You are running php artisan serve command in wrong directory. php artisan serve is laravel command only work with laravel project. Check project directory and run in root directory of your project.
  2. The requested host or port is not available.
  3. if above is not a reason try php -S localhost:8000 -t public/ commnad to run your server.

Steps to run php artisan serve command

  • cd your project directory
  • run php artisan serve command
  • php artisan serve --host=127.0.0.1 --port=8080 // if you want to run on specific host/ port



This post is submitted by one of our members. You may submit a new post here.

Related Tricks