How to restart PHP in ubuntu?

by cortez.connelly , in category: PHP General , 2 years ago

How to restart PHP in ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers


by darion , 2 years ago

@cortez.connelly just run the following command in the terminal to restart PHP in Ubuntu:

sudo service php-fpm restart


by daisha , a year ago


To restart PHP in Ubuntu, you can follow these steps:

  1. Open a terminal.
  2. Type the following command to restart PHP-FPM (FastCGI Process Manager): sudo systemctl restart php7.4-fpm Replace 7.4 with the version of PHP you have installed. You can check the installed versions using the command php -v.
  3. If you are using Apache web server with mod_php, you need to restart the Apache service instead. Type the following command: sudo systemctl restart apache2 Note: Restarting Apache will restart PHP along with it.

That's it! PHP should now be restarted on your Ubuntu system.