Reputation: 2942
I have a laravel app. I ran 'php artisan serve'
command for local testing and my app was served at localhost:8000. But now I want to stop serving it at localhost:8000 ie., I want it not to serve now.
I closed the command line, restarted the server but it is still serving. How can it be done?
Note: I am using windows for testing purposes.
Upvotes: 30
Views: 115432
Reputation: 239
If your using VS Code, simply do the following:
This deletes the shell and kills the server.
Upvotes: 1
Reputation: 7106
When I use cygwin to run my php artisan serve
on Windows machine, pressing ctrl + c does not kill the process. To stop it, use @jsalonen's solution. Basically you are looking for this then kill it:
Upvotes: 6
Reputation: 1236
here is what i do
press ctrl
+ c
> lsof -i :8000
to check if the port is busy or not if any process is listening to the port 8000 it will be displayed with port id
> sudo kill -9 [PID]
kill the process that listen to that port id
run lsof agin
> sudo lsof -i 8000
vola
Upvotes: 53
Reputation: 53
Windows 10 with XAMPP server depending on what shell you use to run:
php artisan serve
In Windows CMD: CTRL + C
In XAMPP Shell: CTRL + Pause/Break
In Ubuntu and RedHat/CentOS terminal it's: CTRL + C
Upvotes: 5
Reputation: 131
For windows user, type this command for showing the list of current running php artisan process:
tasklist /FI "IMAGENAME eq php.exe"
Will show:
Image Name ---- PID ---- Session Name ---- Session ---- Mem Usage
php.exe --------- XXXX ---- Console ---------- 4 ------- 19.852 K
Look up PID number (XXXX), and type this to kill the process:
taskkill /F /PID XXXX
Upvotes: 8
Reputation: 163
I used Ctrl + C in my mac for stop the command php artisan laravel serve
Upvotes: 12
Reputation: 30501
Press Ctrl
+ Shift
+ ESC
. Locate the php process running artisan and kill it with right click -> kill process
.
Reopen the command-line and start back the server.
Note that you should be able to kill the process just by sending it a kill signal with Ctrl
+ C
.
Upvotes: 23