How to apply new PHP handler to multiple domains via CLI in Plesk for Linux?

Follow

Comments

7 comments

  • Avatar
    Jan Schumacher

    or just switch the vendor fastcgi to newer handler on centos for all domains

    /usr/local/psa/bin/php_handler --replace -old-id fastcgi -new-id plesk-php71-fastcgi

     

    1
    Comment actions Permalink
  • Avatar
    Lev Iurev

    @Jan Thats correct, it will change php handler for all domains that used this old php handler.  But not for all domains on the server.

    0
    Comment actions Permalink
  • Avatar
    Daniel Broen

    This method triggers an httpd restart for each domain. Is there a way to do it without restarting httpd for each domain?

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Oxilion, currently this is the only method for changing handler to multiple/all domains.

    To minimize effect from downtime, consider applying this instruction during maintenance time frame.

    0
    Comment actions Permalink
  • Avatar
    Jaden Fyfe

    Keep getting exit status 1 on each domain when running this command.

    Any ideas?

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Jaden, is there any additional message before "exit status 1"?

    For example:

    # plesk bin domain -u example.com -php_handler_id plesk-php70-fpm -nginx-serve-php false
    The license key is invalid. In order to use Plesk, please obtain and install a new valid license key.
    Your license key has expired. To continue using Plesk, buy a non-expiring commercial license key.

    exit status 1

     

    In case there is no any, please, enable Plesk debug, reproduce the issue and check Plesk log at /var/log/plesk/panel.log, there will be more specific error message.

    0
    Comment actions Permalink
  • Avatar
    Chad Reitsma

    Daniel Broen

    I changed the Apache restart interval to 300 (was previously 0), then ran the command - it performed significantly faster than when the restart interval was set to 0.  If you do this method don't forget to put it back to 0, and manually restart apache.

    Cheers,
    C.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request