Posted on: January 29, 2020 12:18 PM
Posted by: Renato
Views: 12424
Linux / Unix: Restart PHP Service Command
PHP is associated with either your web-server or external FastCGI process manager. In most cases you just need to restart web-server such as Apache / Nginx / Lighttpd depending on your system and software.
Restart PHP by restarting your web-server
Type the following command as per your web-server.
Restart Apache for php service
If you are using Apache web server
/etc/init.d/apache2 restart
OR
apache2ctl restart
Restart Nginx for php service
If you are using Nginx web-server type the following command to restart nginx:
/etc/init.d/nginx restart
OR
service nginx restart
OR
nginx -s reload
Restart Lighttpd for php service
If you are using Lighttpd web-server type the following command to restart lightpd:
/etc/init.d/lighttpd restart
OR
service lighttpd restart
Restart PHP-FAM Fastcgi for PHP service
If you are running php via PHP-FAM fastcgi manager, use any one of the following as per your version of Linux/Unix:
/etc/init.d/php-fpm restart
OR php 5 fpm:
/etc/init.d/php5-fpm restart
OR php 7 fpm:
/etc/init.d/php7.0-fpm restart
OR
service php-fpm restart
OR
service php5-fpm restart
OR
service php7.0-fpm restart
OR
restart php-fpm
OR
service php-fpm restart
Donate to Site
Renato
Developer