Linux / Unix - Restart PHP Service Command

Linux / Unix - Restart PHP Service Command

To restart the PHP service on a Unix or Linux system, you will need to use a command or script that is specific to the method used to install and manage PHP on your system.

Here are some common methods for installing and managing PHP on a Unix or Linux system, and the corresponding commands or scripts that can be used to restart the PHP service:

  1. If PHP was installed using a package manager (such as apt or yum), you can use the service or systemctl command to restart the PHP service. For example:
service php7.4-fpm restart
systemctl restart php7.4-fpm
Source:‮ual.www‬tturi.com
  1. If PHP was installed as an Apache module, you can use the service or systemctl command to restart the Apache service. For example:
service apache2 restart
systemctl restart apache2
  1. If PHP was installed as a FastCGI module, you can use the service or systemctl command to restart the web server service. For example:
service nginx restart
systemctl restart nginx
  1. If PHP was installed using a custom script or installer, you may need to consult the documentation or the script itself to determine the appropriate command or script to use to restart the PHP service.
Created Time:2017-10-29 22:08:58  Author:lautturi