I recently upgraded an Ubuntu 14.04 server to PHP 7.0. Everything seemed to go smoothly. However, even after a server reboot, if I do sudo service php7.0-fpm restart I get the error php7.0-fpm: unrecognized service

When I run php -v I can see it is running PHP 7.0.10.

If I check service --status-all I can see php5-fpm in this list instead of 7.

What's going on here?

  • Php-fpm is a separate package/application from php. Php interprets files containing php code, php-fpm speaks the fastcgi protocol with webservers. So look for a php7-fpm package in whatever source you found php7 – Jonah Benton Sep 9 '16 at 20:57

AS @JonahB mentioned in comment, you have to install the php7.0-fpm package as well:

apt-get install php7.0-fpm

You may also want to remove the previous one, even if it's not mandatory:

apt-get remove php5-fpm
  • I removed php5-fpm, but it is still showing up in the service list. How do I remove it completely? – eComEvo Sep 9 '16 at 23:49
  • @eComEvo, try systemctl daemon-reload – Alexander Tolkachev May 10 '17 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.