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

sisilchandana's avatar

php artisan serve not working

I am new to laravel. I installed properly laravel last week and it was work properly. Unfortunately today it is not working. When I issue the php artisan serve command it is not working. Pl help me.

1 like
18 replies
hijacker's avatar

@tisuchi this works for me too, but when using this,livewire on my client computer not working

sisilchandana's avatar

any body families with this error? On internet most of the guys faced this error. Their solutions not work for me? I am used xampp and windows 10 64 bit.

I read some articles on internet and use the following two methods

php artisan serve --host=127.0.0.1 --port=8080 is a one solution but not work for me

php -S localhost:8000 -t public/ - this gives "public/" does not exists'

Help me.

sisilchandana's avatar

I used this command. But this gives "public/ does not exists"

tisuchi's avatar

@sisilchandana

I suggest two solutions-

Way One:

  • Remove vendor folder and run the composer install again to download.
  • Then try to run php artisan serve.

Way Two:

1 like
jlrdw's avatar

Just curious, If you have xampp how come you aren't using Apache.

And if it was working what changes did you make. Did you recently update or upgrade laravel or the framework.

mehdi-elahipour's avatar

hi dear,

first sure command in right directory ----->c:/wamp/www/yourproject>php artisan serve

If the problem is not solved then

step 1:right click on wamp icon open apache list and select httpd-vhost.conf step 2:disable localhost area ...

-- -- ServerName localhost --ServerAlias localhost --DocumentRoot "${INSTALL_DIR}/www" -- -- Options +Indexes +Includes +FollowSymLinks +MultiViews --AllowOverride All --Require local --< /Directory> --< /VirtualHost>

:))))))

Nasirjan's avatar

Why php artisan serve does not work When i enter it goes to next line nothing is happen.

Please help me a soon as possible

1 like
Nasirjan's avatar

Why apache does not get me permission to access resource

1 like
baumgars's avatar

Yes,

php -S localhost:8000 -t public/

works, but the problem remains, that php artisan server does still not work and i found the solution which at least in my specific case solved the problem.

Generally, if php artisan serve does not work / gets stuck at startup / does not expose a "Server running on.." message, this mean something is wrong with your database connection. I looked into my .env file and for some reason the wrong DB Host IP was active. After i corrected it back to 127.0.0.1 everything was fine.

How did i found out? My local xamp mysql was up and running, still no success. I do have some laravel api endpoints which do raw select statements on my DB. These endpoints complained about not being able to connect to the database so i shoot the query manually in MySQL Workbench and i got my result. So something had to be wrong with my laravel app trying to connect with my database and as written above it was the wrong DB Host IP.

Please or to participate in this conversation.