• Resolved Matt

    (@mugwumpman)


    https://independenthostels.co.uk/xmlrpc.php

    What it should return: “XML-RPC server accepts POST requests only.”

    What it does return: 404 error page

    This results in third-party programs such as Jetpack not being able to connect properly with our site.

    I’ve seen other threads on this issue, but they all either turn out to be an unrelated solution or finish with a vague “We contacted our hosts and they sorted it out”. We run our site on a VPS with access to cpanel and WHM so would love to know what it is these hosting companies change.

    What we’ve tried so far:

    We tried temporarily disabling mod_security but that didn’t seem to make a difference, and we couldn’t find any mention of xmlrpc.php in the security rules.

    We noticed a section of our .htaccess file that read…

    # Prevent access to xmlrpc.php
    <Files xmlrpc.php>
    order allow,deny
    deny from all
    </Files>

    …but when we changed it to…

    # Allow access to xmlrpc.php
    <Files xmlrpc.php>
    order deny,allow
    allow from all
    #allow from wordpress.com
    </Files>

    …it still didn’t make any difference.

    Does anyone have any other idea on how to fix this, either on a coding or on a hosting level?

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you didn’t add that directive to .htaccess manually, then take a look in the settings for the security plugin you are using. You can probably turn off the “Deny access to XML-RPC” feature from there.

    If you did add it manually, can you change the symptom by just commenting out the entire block?

    # Prevent access to xmlrpc.php
    # <Files xmlrpc.php>
    # order allow,deny
    # deny from all
    # </Files>

    Thread Starter Matt

    (@mugwumpman)

    We tried commenting it out as well as swapping it from blocking access to allowing access, but it didn’t make any difference. We also couldn’t find any settings regarding access to xmlrpc.php in our security or performance plugins, Wordfence & W3TC. (Plus disabling the plugins didn’t make a difference either)

    Thread Starter Matt

    (@mugwumpman)

    Ahah! We found in the error logs bits that said “xmlrpc.php is writeable by group” So what fixed it in the end was to chmod the permissions on xmlrpc.php from 655 to 644.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘xmlrpc.php gives 404 error’ is closed to new replies.