InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Wordpress security tutorials

  • prevent access to php files in wp-includes
  • prevent wordpress xmlrpc.php attack
 
  • Home
  • > Tutorials
  • > Wordpress
  • > Wordpress Security

prevent wordpress xmlrpc.php attack

By admin | Last updated on Mar 18, 2016

Sometimes you may see too many POST requests to xmlrpc.php in your apache access log. Large number of hits to xmlrpc.php can slow down your site or even bring it down. Easiest way to fix it is to block such IPs using Apache config directives. Here are quick steps to do it.

First find the major IPs hitting xmlrpc.php

$ cat access_log | grep "xmlrpc.php" | awk -F '{print $1}' | sort | uniq -c

This command will give you major IPs which are attacking your web sites. To block these use the following apache config:

<Location /xmlrpc.php>
   <RequireAll>
      Require all granted
      Require not ip IP1 IP2 ...
   </RequireAll>
</Location>

Note that this works in Apache versions 2.4 and above.

Suggested posts:

  1. Block directory access using htaccess 404
  2. Bulk convert jpeg files to png using sips on mac
  3. CSS – inline-block and baseline alignment
  4. PHP sort associative array using custom compare function
  5. How to log page latency and url host in apache log
  6. Disable directory listing in apache
  7. Convert wordpress page to posts and vice versa
  8. Why and how to log Content-Type in apache access log
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Apache, Linux, Tutorials, Wordpress, Wordpress Security
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress