Important: This should be used in case of emergency only.
Just one line…
To kill all PHP Processes
kill $(ps aux | grep '[p]hp' | awk '{print $2}')
To kill all Nginx Processes
kill $(ps aux | grep '[n]ginx' | awk '{print $2}')
To kill all MySQL Processes
kill $(ps aux | grep '[m]ysql' | awk '{print $2}')
You can kill any other type of processes as well. Just make sure you replace [p]hp
with name of that process. Remember to keep first letter in bracket.