{"id":9324,"date":"2018-05-14T14:57:40","date_gmt":"2018-05-14T14:57:40","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=9324"},"modified":"2025-01-08T03:53:31","modified_gmt":"2025-01-08T03:53:31","slug":"xmlrpc-wordpress","status":"publish","type":"post","link":"\/my\/tutorials\/xmlrpc-wordpress","title":{"rendered":"xmlrpc.php in WordPress: What is it and why disable It"},"content":{"rendered":"<p>WordPress has always included features that allow you to interact with your site remotely. For a long time, the solution was a file called <strong>xmlrpc.php<\/strong>. However, in recent years, the file has become more of a problem than a solution.<\/p><p>We&rsquo;ll look at what <strong>xmlrpc.php<\/strong> is and why it was written. We also go over the most common security issues it causes and how to fix them on your own WordPress site.<\/p><p>\n\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-what-is-xmlrpc-php-in-wordpress\">What is xmlrpc.php in WordPress?<\/h2><p>XML-RPC is a feature of WordPress that enables data to be transmitted, with HTTP acting as the transport mechanism and XML as the encoding mechanism. Since WordPress isn&rsquo;t a self-enclosed system and occasionally needs to communicate with other systems, this was used to handle that job.<\/p><p>The core features that <strong>xmlrpc.php<\/strong> enabled were connecting to your site via smartphone, implementing trackbacks and pingbacks from other sites, and some functions associated with the Jetpack plugin.<\/p><p>Let&rsquo;s say you wanted to post to your WordPress site from your mobile device. You could use the remote access feature enabled by <strong>xmlrpc.php<\/strong> to do just that.<\/p><h2 class=\"wp-block-heading\" id=\"h-why-was-xmlrpc-php-created-and-how-was-it-used\">Why was xmlrpc.php created and how was it used<\/h2><p>The use of XML-RPC dates back to the early days of WordPress, before it was even called WordPress.<\/p><p>Writing and publishing on the internet were much more difficult and time-consuming in the early days of the internet when connections were incredibly slow. At the time, the solution was to create an offline blogging client where you could compose your content before connecting to your blog to publish it. This connection was established using XML-RPC. <\/p><p>XML-RPC was initially disabled by default until <strong>WordPress 2.6<\/strong> added a feature in the dashboard to enable or disable it. Then, XML-RPC was enabled by default with <strong>WordPress 3.5 <\/strong>and the introduction of the WordPress mobile app. The option to enable or disable XML-RPC from the dashboard was also removed.<\/p><h3 class=\"wp-block-heading\" id=\"h-xml-rpc-nowadays\">XML-RPC nowadays<\/h3><p>In 2015, WordPress core introduced a new REST API for interacting with mobile applications and other platforms. Many developers began to use the new REST API instead, which effectively replaced XML-RPC. <\/p><p>However, XML-RPC is still enabled in WordPress, and the <strong>xmlrpc.php<\/strong> file is still located in the core software directory.<\/p><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Suggested reading<\/h4>\n                    <p>Learn more about <a href=\"\/my\/tutorials\/wordpress-rest-api\">WordPress REST API<\/a> and how to start using it for WordPress development.<\/p>\n                <\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-why-you-should-disable-xmlrpc-php\">Why you should disable xmlrpc.php<\/h2><p>The biggest problem with XML-RPC is the security concern that arises. The issue isn&rsquo;t with XML-RPC in itself but instead with how the file can be abused to launch cyberattacks on your site. <\/p><p>The first is using <strong>brute-force attacks<\/strong> to gain entry to your site. An attacker will try to access your site using <strong>xmlrpc.php <\/strong>by using various username and password combinations. They can effectively use a single command to test hundreds of different passwords, allowing them to bypass security tools that typically detect and block brute-force attacks.<\/p><p>The second is taking sites offline through a <strong>DDoS attack<\/strong>. Hackers would use the pingback feature in WordPress to send pingbacks to thousands of sites instantaneously. This feature in<strong> xmlrpc.php<\/strong> gives hackers a nearly endless supply of IP addresses over which to distribute a DDoS attack.<\/p><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Pro tip<\/h4>\n                    <p>Various threats pose risks to your website's security. Safeguarding your website against potential vulnerabilities can be achieved by choosing a dependable WordPress hosting provider. Ensure your website's protection by selecting a  <a href=\"\/my\/wordpress-hosting\">secure WordPress host<\/a> that implements advanced security measures.<\/p>\n                <\/div>\n\n\n\n<\/p><p>So, in addition to protecting yourself with strong passwords and <a href=\"\/my\/tutorials\/wordpress-security-plugins\">WordPress security plugins<\/a>, it&rsquo;s best to disable <strong>xmlrpc.php<\/strong>.<\/p><p>To check if XML-RPC is running on your site, run it through a tool called<strong> XML-RPC Validator<\/strong>. If you get an error message, then it means you don&rsquo;t have XML-RPC enabled. But if you get a success message, it&rsquo;s highly recommended that you disable <strong>xmlrpc.php<\/strong>.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-disable-xmlrpc-php-in-wordpress\">How to disable xmlrpc.php in WordPress<\/h2><p>Let&rsquo;s go over the two ways to disable <strong>xmlrpc.php<\/strong> in WordPress.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-disabling-xmlrpc-php-with-a-plugin\">1. Disabling xmlrpc.php with a plugin<\/h3><p>With a plugin, disabling XML-RPC on your WordPress site is simple. <\/p><p>Simply navigate to the&nbsp;<strong>Plugins&nbsp;&rarr; Add New<\/strong>&nbsp;section from within your <a href=\"\/my\/tutorials\/wordpress\/how-to-login-to-wordpress-dashboard\">WordPress dashboard<\/a>. Search for <strong><a href=\"https:\/\/wordpress.org\/plugins\/disable-xml-rpc-api\/\" target=\"_blank\" rel=\"noopener\">Disable XML-RPC-API<\/a><\/strong> and install it. Once you activate the plugin, it will automatically apply the necessary code to turn off XML-RPC.<\/p><p>Keep in mind that other existing plugins may utilize parts of XML-RPC, so disabling it completely could cause a plugin conflict or certain elements of your site to no longer function.<\/p><h3 class=\"wp-block-heading\" id=\"h-2-disabling-xmlrpc-php-manually\">2. Disabling xmlrpc.php manually<\/h3><p><span style=\"margin: 0px;padding: 0px\">If you prefer to delete&nbsp;<strong>xmlrpc.php<\/strong>&nbsp;manually<\/span>, follow this method which will stop all incoming <strong>xmlrpc.php <\/strong>requests before they get passed onto WordPress.<\/p><p>Access your <strong>.htaccess <\/strong>file through your hosting control panel&rsquo;s File Manager or an FTP client. You may have to turn on the <strong>Show hidden files<\/strong> option to make this file visible. Inside your <strong><em>.<\/em>htaccess<\/strong> file, paste the following code:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Block WordPress xmlrpc.php requests\n&lt;Files xmlrpc.php&gt;\norder deny,allow\ndeny from all\nallow from xxx.xxx.xxx.xxx\n&lt;\/Files&gt;<\/pre><p>\n\n\n<div><p class=\"important\"><strong>Important!<\/strong> Change xxx.xxx.xxx.xxx to IP address you wish to allow access <strong>xmlrpc.php<\/strong> or remove this line completely.<\/p><\/div>\n\n\n<?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a href=\"\/my\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner-1024x300.png\" alt=\"\" class=\"wp-image-111781\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner-1024x300.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner-300x88.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner-150x44.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner-768x225.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner-1536x450.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>XML-RPC was a solid remote publishing tool for your WordPress site. However, it came with some security holes that ended up being pretty damaging for some WordPress site owners.<\/p><p>To ensure your site remains secure, it&rsquo;s highly recommended to disable xmlrpc.php entirely by using a plugin or manually editing the <strong>.htaccess <\/strong>file.<\/p><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Learn more about WordPress<\/h4>\n                    <p><br>\n<a href=\"\/my\/tutorials\/how-to-use-xampp-wordpress\/\">How to use XAMPP in WordPress<\/a><br>\n<a href=\"\/my\/tutorials\/wordpress\">WordPress tutorial<\/a><br>\n<a href=\"\/my\/tutorials\/best-wordpress-frameworks\">Best WordPress frameworks<\/a><br>\n<a href=\"\/my\/tutorials\/wordpress-heartbeat\">What is the WordPress Heartbeat API<\/a><br>\n<a href=\"\/my\/tutorials\/wordpress-custom-css\">How to add custom CSS to WordPress<\/a><\/p>\n                <\/div>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress has always included features that allow you to interact with your site remotely. For a long time, the solution was a file called xmlrpc.php. However, in recent years, the file has become more of a problem than a solution. We&rsquo;ll look at what xmlrpc.php is and why it was written. We also go over [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/my\/tutorials\/xmlrpc-wordpress\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":411,"featured_media":69236,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"What is xmlrpc.php in WordPress and why you should disable It","rank_math_description":"XML-RPC allows WordPress to connect to other systems, but xmlrpc.php file is known for security issues. Learn what it is and how to disable it.","rank_math_focus_keyword":"xmlrpc.php, xmlrpc","footnotes":""},"categories":[22635,22632],"tags":[],"class_list":["post-9324","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security-and-maintenance","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/xmlrpc-wordpress","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/o-que-e-xmlrpc-php","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/xmlrpc-php","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/que-es-xmlrpc-php-wordpress-por-que-desactivarlo","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/xmlrpc-php-wordpress","default":0},{"locale":"nl-NL","link":"https:\/\/www.hostinger.com\/nl\/tutorials\/xmlrpc-php-wordpress","default":0},{"locale":"ja-JP","link":"https:\/\/www.hostinger.com\/jp\/tutorials\/xmlrpc-wordpress","default":0},{"locale":"ar-AE","link":"https:\/\/www.hostinger.com\/ae\/tutorials\/xmlrpc-wordpress","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/xmlrpc-wordpress","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/xmlrpc-wordpress","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/xmlrpc-wordpress","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/que-es-xmlrpc-php-wordpress-por-que-desactivarlo\/","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/que-es-xmlrpc-php-wordpress-por-que-desactivarlo\/","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/que-es-xmlrpc-php-wordpress-por-que-desactivarlo\/","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/o-que-e-xmlrpc-php","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/xmlrpc-wordpress","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/xmlrpc-wordpress","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/xmlrpc-wordpress","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/xmlrpc-wordpress","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/9324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/users\/411"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/comments?post=9324"}],"version-history":[{"count":38,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/9324\/revisions"}],"predecessor-version":[{"id":121141,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/9324\/revisions\/121141"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/media\/69236"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/media?parent=9324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/categories?post=9324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/tags?post=9324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}