Disable your anti-virus. and make sure you're not freezing the terminal.
And please share your machine specs.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Whenever I run php artisan serve command in vscode it stucks up there. I don't know why? I have tried almost everything to fix this thing but nothing worked.
Disable your anti-virus. and make sure you're not freezing the terminal.
And please share your machine specs.
@MohamedTammam I am not using any anti-virus right now. My vscode terminal gets freezed when I run it but my server keeps running in browser though. If I press CTRL+C then things gets back to normal again. But why is it freezing idk. I am using win10 and my Machine specs: CPU: Core i5 (4th gen) Ram: 16GB ddr3 Had Disk: 2.5TB (2+500) No external GPU
@nishatmamun ONly your local server again run apache or mysql . i facing this issue because my mysql during working stop and php artisan serve command stuck
Do you mean it does not exit automatically? Try ctrl+c
@Sinnbeck If I press CTRL+C it exits but why it freezes when I run this command.
@nishatmamun what do you mean by freeze? Its supposed to stay running until you exit it with ctrl+c. Otherwise you cannot use it for anything. It's how it works
@Sinnbeck Well I attached a screenshot link here. You can see here it stuck up there. [postimg.cc/BPH8Dhc9]
@nishatmamun does it work if you run it in a regular terminal? Do you have xdebug installed
@Sinnbeck I don't have xdebug. It also stuck in cmd terminal, gitbash.
@nishatmamun
You need to decide if you want to use xampp or php artisan serve, don't use both, they migth end up in conflict with eachother.
Of course it gets "stuck" that is the way the starting of the built in php server works. There isn't anything wrong. If you want to send the process to the background you try
nohup php artisan serve, but I don't see the need for it. The process is supposed to run in the foreground, so just open another terminal window.
@nishatmamun can you use it? Like visit the site. Does other commands work?
@Tray2 Yeah I can use it with these stuck but often this hang breaks with lots of error and this is so painful.
@Sinnbeck yeah I can visit the site. But the problem is, it often throws bunch of error with server disconnection.
@nishatmamun The errors it throws are probably due, either to misconfiguration or mistakes in your code.
I suggest not using php artisan serve and use xampp since you obviously have it installed, or even better setup a proper linux server to run your application on,
https://www.howtoforge.com/tutorial/install-laravel-on-ubuntu-for-apache/
@Tray2 can you explain to me what do you mean by we shouldn't user xampp and php artisan serve together ??? i have been doing that ... like i run the xampp (apache and MySQL ) and then php artisan serve in my vs code terminal... i am not wrong , am i ?
@srushti_kansagara Not technically wrong, but you are using two webservers, Apache and the one built into php.
I suggest that you pick one and stick to it, and have both up and running at the same time.
I also would suggest switching Herd. https://herd.laravel.com
@Tray2 my current project is on the laravel 10 and php 8.2 do don't know if herd will work with that i have never work with the herd and also if i stop the xampp then i am getting the error No connection could be made because the target machine actively refused it btw i am talking about development environment
@srushti_kansagara yes, herd supports laravel 10 and php 8.2
@srushti_kansagara Laravel 10 works just fine on Herd. The issue with the refusing of the connection is likely the database server that isn't running, but I would suggest using dbngin to handle the databases https://dbngin.com/
@Snapey i know i am asking silly question but what is the actual use of herd.. like it is working without php artisan serve but i still need to use run the xampp right
@srushti_kansagara No, Herd removes the need of using XAMPP and php artisan serve
Laravel development perfected One click PHP development environment.
Zero dependencies. Zero headaches.
Please or to participate in this conversation.