Monday, August 14, 2017

How to restart php-fpm on Lubuntu

How to restart php-fpm on Lubuntu

After editing php.ini the next thing you want to do is to restart the php itself so that the changes in php.ini can take effect. So the question is how to restart php (php-fpm) on lubuntu?

There are number of ways to restart php or php-fpm, each version of php have slightly different command, you need to specify the php version. Here's list of command that you can use to restart php-fpm.

Restart php using init script directly
sudo /etc/init.d/php-fpm restart    
sudo /etc/init.d/php5-fpm restart   
sudo /etc/init.d/php7.0-fpm restart

Restart php using service
sudo service php-fpm restart   
sudo service php5-fpm restart   
sudo service php7.0-fpm restart 

Restart php using upstart
sudo restart php7.0-fpm         
sudo restart php5-fpm           
sudo restart php-fpm           

Restart php using systemd
sudo systemctl restart php-fpm.service   
sudo systemctl restart php5-fpm.service  
sudo systemctl restart php7.0-fpm.service

No comments:

Post a Comment