Plesk

Unable to use DELETE, PUT or PATCH HTTP verbs with .php files or Web API on a Plesk for Windows server: 405 – HTTP verb used to access this page is not allowed

Symptoms

When using DELETE, PUT or PATCH HTTP methods with .php files or Web API, the following error message appears in a web-browser:

405 - HTTP verb used to access this page is not allowed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access

Cause

HTTP verb which is being used is not registered for a particular handler/file extension.

Resolution

  1. Connect to the Plesk server via RDP.

  2. Launch Internet Information Service (IIS) Manager at Windows Start > All Programs > Windows Administrative Tools.

  3. In IIS Manager, expand SERVERNAME > Sites > click example.com > Handler Mappings (under IIS).

  4. Find the handler which is used by the website and double-click on it.

    For example, if this is a PHP website, double-click on PHP-php.

  5. Click Request Restrictions....


  6. Switch to the Verbs tab.

  7. Add required verbs in to the verbs field, for example:

    GET,HEAD,POST,PUT,DELETE,PATCH

  8. Click OK to apply the changes in both windows.

    Note: If you get the warning "The specified executable for the handler must be a .dll or .exe file", that means the path in the Executable (optional) field contains spaces. In this case, use double quotation marks to specify the executable, for example:
    "C:Program Files (x86)PleskAdditionalPleskPHP74php-cgi.exe"|-d siteId=10

 

Video instructions