Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

php_handler.exe: Custom PHP Handlers

 
cli winusing command line utilitiesguidephpwebsites

The php_handler utility is used to register custom PHP handlers,
which allow you to use multiple PHP versions and multiple php.ini
files in Plesk. For more information, see Multiple PHP
Versions

in the Administrator’s Guide.

By using the php_handler utility, you can perform the following
tasks:

  • changing a certain PHP handler in service plans and subscriptions
  • listing registered PHP handlers in JSON format

Location

%plesk_cli%

Usage

php_handler.exe <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]

Example

The following command enables the custom PHP handler with ID 3.

plesk bin php_handler.exe --enable -id 3

Commands

Command Parameter Description Example
--replace   Replaces a certain PHP handler with another one for all service
plans and websites in Plesk.

To replace the PHP handler (id=*123*) with another PHP handler
(id=*789*):

plesk bin php_handler.exe --replace -old-id 123 -new-id 789

--enable   Enables the specified PHP handler.

To enable the plesk-php52-cgi PHP handler:

plesk bin php_handler.exe --enable -id plesk-php52-cgi

--disable   Disables the specified PHP handler.

To disable the plesk-php52-cgi PHP handler:

plesk bin php_handler.exe --disable -id plesk-php52-cgi

--get-usage   Displays the usage of the specified PHP handler.

To get the usage of the plesk-php52-cgi PHP handler:

plesk bin php_handler.exe --get-usage -id plesk-php52-cgi

--list   Displays the list of all PHP handlers registered in Plesk.

To view all registered PHP handlers:

plesk bin php_handler.exe --list

--reread   Refreshes information about PHP handlers in Plesk. Use this
command after you changed PHP handlers properties not through
Plesk.

To refresh information about PHP handlers in Plesk:

plesk bin php_handler.exe --reread

--help or -h   Displays help on the use of the utility.

To view help on the use of the utility:

plesk bin php_handler.exe --help

or

plesk bin php_handler.exe -h

Options

Option Parameter Description Example
-id <handler id> Sets the PHP handler identifier.

To get the usage information for the PHP handler with the ID 5:

plesk bin php_handler.exe --get-usage -id 5

-old-id <old handler id> Specifies the PHP handler you want to replace.

To replace the PHP handler (id=*123*) with another PHP handler
(id=*789*):

plesk bin php_handler.exe --replace -old-id 123 -new-id 789

-new-id <new handler id> Specifies the PHP handler with which you want to replace the
existing one.
 
-json true|false Displays the output in the JSON format.

To display the list of PHP handlers in the JSON format:

plesk bin php_handler.exe --list -json

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Ruby on Rails vs PHP: Which one’s right for your needs?

Read More »

Exploring Plesk’s Added Value Solutions So Far in 2023

Read More »

Unveiling Sitejet Builder: The Perfect Match for Your Effortless Website Creation Needs

Read More »
Knowledge Base

Managing ICP Permits – Assigning ICP Permits to websites

Read More »

Importing Websites – Importing Databases

Read More »

FTP Access to Your Websites

Read More »

Importing Websites – Importing Folders

Read More »

Hosting Wiki

  • CLI
  • PhpMyAdmin
  • phpPgAdmin
  • PHP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family