How to apply new PHP handler to multiple domains via CLI?

Follow

Comments

6 comments

  • Avatar
    Jan Schumacher - webhoster.ag

    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

     

  • 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.

  • Avatar
    Oxilion

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

  • 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.

  • Avatar
    Jaden Fyfe

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

    Any ideas?

  • 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.

Please sign in to leave a comment.

Have more questions? Submit a request