How to Restart PHP-FPM Service and Reload Config

Last updated on

To restart the PHP-FPM service and reload the configuration file, firstly check which version of PHP you are running:

php -v
PHP 7.2.15-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb  8 2019 15:38:01) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.15-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

Above we can see we are running PHP v7.2, therefore the service name should be php7.2-fpm.

To restart the PHP-FPM service, run;

sudo service php7.2-fpm restart
1 Star2 Stars3 Stars4 Stars5 Stars 4.00 (6 votes)

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

p.s. I increased my AdSense revenue by 68% using AI 🤖. Read my Ezoic review to find out how.

3 replies

avatar
  Subscribe  
newest oldest
Notify of
Fernando
Guest
Fernando
Fernando
1 year ago

Hello

This command is not working here :

[email protected]:/etc/php/7.0/apache2# service php7.0-fpm restart
Failed to restart php7.0-fpm.service: Unit php7.0-fpm.service not found.

Can i help me?

Thank you

Fernando
Guest
Fernando
Fernando
1 year ago

[email protected]:/etc/php/7.0/apache2# php -v
PHP 7.0.32-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.32-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies