Php Artisan Serve Not Working Properly – Laravel Command

Php Artisan Serve Not Working – Laravel Command , We will share with you how to run your laravel based project using the another php command.

If you are using the latest version for Laravel 5.X, you will see that sometime “php artisan serve” command doesn’t work properly. If you face this type of problem, you can use the below command and start your server locally.

We will run our project on localhost, so go to your project root directory using this below command :

cd your project name 

Next run the following command for run your project on localhost with the port 8000, we will not use php artisan serve. we use below the following command :

php -S localhost:8000 -t public/

After run this command on command prompt, you look like this. Start your server locally with host localhost and port 8000 :

php artisan serve not working

If you want to run your project on diffrent port or diffrent host, you can do it with the of this command

Diffrent Port

php -S localhost:9000 -t public/

Diffrent host

php -S  127.0.0.1:9000 -t public/

Testing

Now this time we check our project is running properly or not, Go to in your browser type this below :

localhost:8000

when we hit the url in browser , look like this :

php artisan serve not working

with diffrent port , look like this :

php artisan serve not working

Php artisan serve not working properly we use the php -S localhost:8000 and run our project simply.

Sometime php artisan serve not working properly that time we can you also http://localhost/here_project_name/public/.

If you have any questions or thoughts to share, use the comment form below to reach us.

6 Comments

  1. Kraka said:

    Thanks… It’s really help me
    I just start to learn laravel and then when i tried “php artisan serve”, it work on cmd. But it alway loading on browser. Until i found your post. Thank’s a lot

    May 25, 2019
    Reply
  2. Amr Nabil said:

    Thanks a lot it solve my problem

    June 3, 2019
    Reply
  3. nipun said:

    thank you very much it helpful to me

    June 7, 2019
    Reply
  4. mohamed al kady said:

    thanks a looooooooooooooooooooooooooooot

    July 2, 2019
    Reply
  5. Hadi said:

    Thanks Bro ^_^

    July 17, 2019
    Reply
  6. htun grace said:

    Thank you so much . This work well

    August 14, 2019
    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *