0

I hope someone might be able to help with this. A week ago we had a severe drop in rankings on the home page only. When I went to Google Search Console a new error was reported 2 days before the drop. The first was xmlrpc.php was returning a 405 error and wp-admin/admin-ajax.php is returning a 400 error.

I am looking at fixing the errors now, but one advice I saw on another site was to replace the xmlrpc with one from a fresh wordpress download. My question is, will this mess up a website?

any advice to get around the other error would also be much appreciated. Thanks

This all seems to of happened when a plugin was updated (Toolset Types) but the site is built with this so I cannot disable that particular plugin.

Many thanks in advance.

1

You can look at the requests data / response data via Developer Tools in your browser (usually F12, but depends on your browser). That might give you some indication of the direction to investigate.

Personal Opinion

Personally, I have disabled xmlrpc.prg on all of my sites. It is an easy way for a hacker to attack your site, either with a DDOS, or even a brute force attack on your login page. The xmlrpc.prg allows the hacker to 'stack' multiple requests into one reqeust.

In fact, I had to de-hack a site that was compromised due to an apparent xmlrpc.prg attack. They modified files, inserting some obfuscated code.

You might want to investigate if your site really needs to have xmlprc.prg enabled. You can disable it with this command in your functions.php file:

add_filter('xmlrpc_enabled', '__return_false');

You can also deny access via your htaccess file:

# Block WordPress xmlrpc.php requests
<Files xmlrpc.php>
order deny,allow
deny from all
# allow from xx.xx.xx.xx   #add allowed IP addresses
</Files>

Note that disabling xmlrpc.prg may cause problem with remote posting processes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.