diff --git a/core/includes/common.inc b/core/includes/common.inc
index 0b17746..5654d28 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -7677,39 +7677,6 @@ function drupal_check_incompatibility($v, $current_version) {
 }
 
 /**
- * Performs one or more XML-RPC request(s).
- *
- * Usage example:
- * @code
- * $result = xmlrpc('http://example.com/xmlrpc.php', array(
- *   'service.methodName' => array($parameter, $second, $third),
- * ));
- * @endcode
- *
- * @param $url
- *   An absolute URL of the XML-RPC endpoint.
- * @param $args
- *   An associative array whose keys are the methods to call and whose values
- *   are the arguments to pass to the respective method. If multiple methods
- *   are specified, a system.multicall is performed.
- * @param $options
- *   (optional) An array of options to pass along to drupal_http_request().
- *
- * @return
- *   For one request:
- *     Either the return value of the method on success, or FALSE.
- *     If FALSE is returned, see xmlrpc_errno() and xmlrpc_error_msg().
- *   For multiple requests:
- *     An array of results. Each result will either be the result
- *     returned by the method called, or an xmlrpc_error object if the call
- *     failed. See xmlrpc_error().
- */
-function xmlrpc($url, $args, $options = array()) {
-  require_once DRUPAL_ROOT . '/core/includes/xmlrpc.inc';
-  return _xmlrpc($url, $args, $options);
-}
-
-/**
  * Retrieves a list of all available archivers.
  *
  * @see hook_archiver_info()
diff --git a/core/modules/simpletest/simpletest.info b/core/modules/simpletest/simpletest.info
index d18fe6e..29f2974 100644
--- a/core/modules/simpletest/simpletest.info
+++ b/core/modules/simpletest/simpletest.info
@@ -38,7 +38,6 @@ files[] = tests/theme.test
 files[] = tests/unicode.test
 files[] = tests/update.test
 files[] = tests/uuid.test
-files[] = tests/xmlrpc.test
 files[] = tests/upgrade/upgrade.test
 files[] = tests/upgrade/upgrade_bare.test
 files[] = tests/upgrade/upgrade_filled.test
diff --git a/core/modules/simpletest/tests/xmlrpc.test b/core/modules/xmlrpc/tests/xmlrpc.test
similarity index 95%
rename from core/modules/simpletest/tests/xmlrpc.test
rename to core/modules/xmlrpc/tests/xmlrpc.test
index 60b9624..cc327a3 100644
--- a/core/modules/simpletest/tests/xmlrpc.test
+++ b/core/modules/xmlrpc/tests/xmlrpc.test
@@ -13,6 +13,10 @@ class XMLRPCBasicTestCase extends DrupalWebTestCase {
     );
   }
 
+  function setUp() {
+    parent::setUp('xmlrpc');
+  }
+
   /**
    * Ensure that a basic XML-RPC call with no parameters works.
    */
@@ -27,9 +31,8 @@ class XMLRPCBasicTestCase extends DrupalWebTestCase {
     );
 
     // Invoke XML-RPC call to get list of methods.
-    $url = url(NULL, array('absolute' => TRUE)) . 'core/xmlrpc.php';
+    $url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
     $methods = xmlrpc($url, array('system.listMethods' => array()));
-
     // Ensure that the minimum methods were found.
     $count = 0;
     foreach ($methods as $method) {
@@ -45,7 +48,7 @@ class XMLRPCBasicTestCase extends DrupalWebTestCase {
    * Ensure that system.methodSignature returns an array of signatures.
    */
   protected function testMethodSignature() {
-    $url = url(NULL, array('absolute' => TRUE)) . 'core/xmlrpc.php';
+    $url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
     $signature = xmlrpc($url, array('system.methodSignature' => array('system.listMethods')));
     $this->assert(is_array($signature) && !empty($signature) && is_array($signature[0]),
       t('system.methodSignature returns an array of signature arrays.'));
@@ -90,14 +93,14 @@ class XMLRPCValidator1IncTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('xmlrpc_test');
+    parent::setUp('xmlrpc', 'xmlrpc_test');
   }
 
   /**
    * Run validator1 tests.
    */
   function testValidator1() {
-    $xml_url = url(NULL, array('absolute' => TRUE)) . 'core/xmlrpc.php';
+    $xml_url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
     srand();
     mt_srand();
 
@@ -204,14 +207,14 @@ class XMLRPCMessagesTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('xmlrpc_test');
+    parent::setUp('xmlrpc', 'xmlrpc_test');
   }
 
   /**
    * Make sure that XML-RPC can transfer large messages.
    */
   function testSizedMessages() {
-    $xml_url = url(NULL, array('absolute' => TRUE)) . 'core/xmlrpc.php';
+    $xml_url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
     $sizes = array(8, 80, 160);
     foreach ($sizes as $size) {
       $xml_message_l = xmlrpc_test_message_sized_in_kb($size);
@@ -228,7 +231,7 @@ class XMLRPCMessagesTestCase extends DrupalWebTestCase {
 
     // Ensure xmlrpc_test_xmlrpc_alter() is disabled and retrieve regular list of methods.
     variable_set('xmlrpc_test_xmlrpc_alter', FALSE);
-    $url = url(NULL, array('absolute' => TRUE)) . 'core/xmlrpc.php';
+    $url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
     $methods1 = xmlrpc($url, array('system.listMethods' => array()));
 
     // Enable the alter hook and retrieve the list of methods again.
diff --git a/core/modules/simpletest/tests/xmlrpc_test.info b/core/modules/xmlrpc/tests/xmlrpc_test.info
similarity index 100%
rename from core/modules/simpletest/tests/xmlrpc_test.info
rename to core/modules/xmlrpc/tests/xmlrpc_test.info
diff --git a/core/modules/simpletest/tests/xmlrpc_test.module b/core/modules/xmlrpc/tests/xmlrpc_test.module
similarity index 100%
rename from core/modules/simpletest/tests/xmlrpc_test.module
rename to core/modules/xmlrpc/tests/xmlrpc_test.module
diff --git a/core/includes/xmlrpc.inc b/core/modules/xmlrpc/xmlrpc.inc
similarity index 100%
rename from core/includes/xmlrpc.inc
rename to core/modules/xmlrpc/xmlrpc.inc
diff --git a/core/modules/xmlrpc/xmlrpc.info b/core/modules/xmlrpc/xmlrpc.info
new file mode 100644
index 0000000..9b764f3
--- /dev/null
+++ b/core/modules/xmlrpc/xmlrpc.info
@@ -0,0 +1,6 @@
+name = XML-RPC
+description = Provides XML-RPC functionality.
+package = Core
+version = VERSION
+files[] = tests/xmlrpc.test
+core = 8.x
diff --git a/core/modules/xmlrpc/xmlrpc.module b/core/modules/xmlrpc/xmlrpc.module
new file mode 100644
index 0000000..64e4a15
--- /dev/null
+++ b/core/modules/xmlrpc/xmlrpc.module
@@ -0,0 +1,53 @@
+<?php
+
+ /**
+  * @file
+  * Enables XML-RPC functionality.
+  */
+
+ /**
+  * Implements hook_menu().
+  */
+ function xmlrpc_menu() {
+   $items['xmlrpc.php'] = array(
+     'title' => 'XML-RPC',
+     'page callback' => 'xmlrpc_server_page',
+     'access callback' => TRUE,
+     'type' => MENU_CALLBACK,
+     'file' => 'xmlrpc.pages.inc',
+   );
+   return $items;
+ }
+
+ /**
+  * Performs one or more XML-RPC request(s).
+  *
+  * Usage example:
+  * @code
+  * $result = xmlrpc('http://example.com/xmlrpc.php', array(
+  *   'service.methodName' => array($parameter, $second, $third),
+  * ));
+  * @endcode
+  *
+  * @param $url
+  *   An absolute URL of the XML-RPC endpoint.
+  * @param $args
+  *   An associative array whose keys are the methods to call and whose values
+  *   are the arguments to pass to the respective method. If multiple methods
+  *   are specified, a system.multicall is performed.
+  * @param $options
+  *   (optional) An array of options to pass along to drupal_http_request().
+  *
+  * @return
+  *   For one request:
+  *     Either the return value of the method on success, or FALSE.
+  *     If FALSE is returned, see xmlrpc_errno() and xmlrpc_error_msg().
+  *   For multiple requests:
+  *     An array of results. Each result will either be the result
+  *     returned by the method called, or an xmlrpc_error object if the call
+  *     failed. See xmlrpc_error().
+  */
+ function xmlrpc($url, $args, $options = array()) {
+   module_load_include('inc', 'xmlrpc');
+   return _xmlrpc($url, $args, $options);
+ }
diff --git a/core/includes/xmlrpcs.inc b/core/modules/xmlrpc/xmlrpc.pages.inc
similarity index 98%
rename from core/includes/xmlrpcs.inc
rename to core/modules/xmlrpc/xmlrpc.pages.inc
index 118f652..e1c160b 100644
--- a/core/includes/xmlrpcs.inc
+++ b/core/modules/xmlrpc/xmlrpc.pages.inc
@@ -2,10 +2,18 @@
 
 /**
  * @file
- * Provides API for defining and handling XML-RPC requests.
+ * Page callback file for the xmlrpc module.
  */
 
 /**
+ * Process an XML-RPC request.
+ */
+function xmlrpc_server_page() {
+  module_load_include('inc', 'xmlrpc');
+  xmlrpc_server(module_invoke_all('xmlrpc'));
+}
+
+/**
  * Invokes XML-RPC methods on this server.
  *
  * @param array $callbacks
diff --git a/core/xmlrpc.php b/core/xmlrpc.php
deleted file mode 100644
index 562aa81..0000000
--- a/core/xmlrpc.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/**
- * @file
- * PHP page for handling incoming XML-RPC requests from clients.
- */
-
-// Change the directory to the Drupal root.
-chdir('..');
-
-/**
- * Root directory of Drupal installation.
- */
-define('DRUPAL_ROOT', getcwd());
-
-include_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
-drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
-include_once DRUPAL_ROOT . '/core/includes/xmlrpc.inc';
-include_once DRUPAL_ROOT . '/core/includes/xmlrpcs.inc';
-
-xmlrpc_server(module_invoke_all('xmlrpc'));
