How to restart PHP service in Plesk?

Follow

Comments

6 comments

  • Avatar
    Remigio Ruberto

    Please, provide command to restart php via cron manager. Thank you

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Remigio,

    Using Plesk Task Manager it's just required to add "sudo" before the command from above solution.

    I've tested it with PHP 7.2:

     

    0
    Comment actions Permalink
  • Avatar
    Multimedia Pool (Edited )

    Hello,

    could you show the command to restart the service fpm by OS vendor, please? Or in other words, what is the exact name of the service for starting it? It doesn't work by service fpm restart, service php-fpm restart, service php-fpm7.2 restart, nor service php-fpm72 restart.

    Thanks and Greets

    0
    Comment actions Permalink
  • Avatar
    Anton Maslov

    Hello,

    What is your OS please?

    For CentOS 7 and Ubuntu 18 the below works:

    service php-fpm restart

    Thought you might not have OS PHP-FPM installed, you can check all the available handlers like this:

    plesk bin php_handler --list

    0
    Comment actions Permalink
  • Avatar
    Multimedia Pool

    Thanks for help. I use Ubuntu 18.04.3. I already tried this, but I get "Failed to restart php-fpm.service: Unit php-fpm.service not found."

    But the handler is installed, the only thing is, none of my domains/websites use it.

    0
    Comment actions Permalink
  • Avatar
    Alisa Kasyanova

    @Multimedia Pool
    Try "service php7.2-fpm restart".
    However, please note that if this handler is not used by any domain, you may face the "No pool defined. at least one pool section must be specified in config file" error as per this article

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request