How to restart PHP service after editing php.ini

by cybersal

How do I restart php service after editing php.ini file on Linux operating systems?

In most cases you just need to restart web-server such as Apache / Nginx  depending on your system and software.

Execute the following command on your web-server:

Restart your Apache server by executing either of the command:

# /etc/init.d/apache2 restart

# apache2ctl restart

Restart your Nginx server by executing either of the command:

# /etc/init.d/nginx restart

# service nginx restart

# nginx -s reload

Restart your PHP-FAM Fastcgi by executing either of the command:

# /etc/init.d/php-fpm restart or # service php-fpm restart

# /etc/init.d/php5-fpm restart

# service php5-fpm restart (for php 5 fpm)

# /etc/init.d/php7.0-fpm restart

# service php7.0-fpm restart (for php 7 fpm)

restart PHP service

Related Articles

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy