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

snaveenrpm's avatar

php artisan serve not found

I successfully installed laravel lumen micro framework ...... All artisan commands are working except php artisan serve

Finally i got error.... php artisan serve [Symfony\Component\Console\Exception\CommandNotFoundException] Command "serve" is not defined.

0 likes
5 replies
primordial's avatar

Try using

php -S localhost:8000 -t public

same thing written natively. Maybe a different default port number.

@edit Beaten to the finish (doh!)

1 like
radhagupta's avatar

Worked perfectly. I was struggling with this for 3 days. Thanks everyone.

vrkansagara's avatar

Better way to use following command.

php -S 0.0.0.0:8090 -d public/index.php -t public

0.0.0.0 = bind to any IP so , you can share with lan machine as well or share with team using your ip like 192.168.1.1:8080

where 192.168.1.1 is my system ip then other can also access to it.

==== OTHER WAY =====

Add following codde in composer.json file

"scripts": { "serve": "php -S 0.0.0.0:8090 -d public/index.php -t public" },

now use " composer serve " form command line.

Please or to participate in this conversation.