Understanding the Error

The error “Jetpack could not contact WordPress.com: register_http_request_failed” occurs when the Jetpack plugin on your self-hosted WordPress site cannot establish a connection to the WordPress.com servers. Jetpack requires a two-way communication channel between your site and WordPress.com to function, and this error indicates that the initial registration handshake has failed.

The typical error message looks like:

Jetpack could not contact WordPress.com: register_http_request_failed.
Error Details: The Jetpack server could not communicate with your site's XML-RPC URL.

How Jetpack Communication Works

When Jetpack connects your site to WordPress.com, the following steps occur:

  1. Your WordPress site sends an HTTPS request outbound to https://jetpack.wordpress.com/jetpack.register/1/
  2. WordPress.com verifies your site by making an inbound request to your site’s xmlrpc.php endpoint
  3. Both sides exchange authentication tokens to establish a persistent connection

If either the outbound or inbound connection fails, you get the register_http_request_failed error.

Common Causes

1. SSL Certificate Mismatch

The Jetpack service endpoint at jetpack.wordpress.com may present an SSL certificate that does not exactly match the domain. If your server’s certificate validation is strict (which it should be), a wildcard certificate mismatch will cause the connection to fail.

This was a known issue when Jetpack used a *.wordpress.com wildcard certificate but served content from a jetpack.wordpress.com subdomain — some strict firewalls and certificate validators would reject this.

2. Server Firewall Blocking Outbound HTTPS

Your web server’s firewall may block outbound connections on port 443 (HTTPS). Jetpack requires your server to make external HTTPS requests.

3. Hosting Provider Restrictions

Some shared hosting providers restrict outbound HTTP/HTTPS requests from PHP for security reasons, or throttle them so aggressively that the request times out.

4. xmlrpc.php Blocked

Many security plugins and server hardening guides recommend blocking access to xmlrpc.php to prevent brute force attacks. If xmlrpc.php is blocked, WordPress.com cannot verify your site.

5. cURL Not Installed or Misconfigured

WordPress uses PHP’s cURL library for HTTP requests. If cURL is not installed or lacks SSL support, outbound requests will fail.

6. Proxy Server Interference

If your server routes traffic through a corporate proxy, the proxy may interfere with SSL certificates or block the Jetpack endpoints.

Diagnosing the Issue

Paso 1: Test Outbound Connectivity from the Server

SSH into your web server and test whether it can reach WordPress.com:

# Test basic HTTPS connectivity
curl -v https://jetpack.wordpress.com/jetpack.register/1/

# Test with detailed SSL information
curl -vI https://jetpack.wordpress.com 2>&1 | grep -E "(SSL|certificate|subject|issuer)"

# Test if outbound port 443 is open
nc -zv jetpack.wordpress.com 443

If curl fails with an SSL error like SSL certificate problem: unable to get local issuer certificate, the CA bundle on your server is outdated.

Paso 2: Check PHP cURL Support

Create a temporary PHP file to test cURL:

<?php
// Save as /tmp/test-curl.php and run from command line
// Delete immediately after testing

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://jetpack.wordpress.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_VERBOSE, true);

$response = curl_exec($ch);
$error = curl_error($ch);
$info = curl_getinfo($ch);
curl_close($ch);

echo "HTTP Code: " . $info['http_code'] . "\n";
echo "SSL Verify Result: " . $info['ssl_verify_result'] . "\n";
if ($error) {
    echo "Error: " . $error . "\n";
}
php /tmp/test-curl.php
rm /tmp/test-curl.php

Paso 3: Test xmlrpc.php Accessibility

From an external machine (not your server), verify that xmlrpc.php is accessible:

curl -v https://yourdomain.com/xmlrpc.php

The expected response should be:

XML-RPC server accepts POST requests only.

If you get a 403 Forbidden, 404 Not Found, or a security plugin block page, xmlrpc.php is being blocked.

Paso 4: Use the Jetpack Debug Tool

WordPress provides a built-in debug page. Visit:

https://yourdomain.com/wp-admin/admin.php?page=jetpack-debugger

Or use the Jetpack debug site:

https://jetpack.com/support/debug/?url=yourdomain.com

Paso 5: Check wp_remote_get

Add temporary debugging code to your theme’s functions.php (remove after testing):

// Add to functions.php temporarily for debugging
add_action('admin_init', function() {
    if (isset($_GET['test_jetpack_connection'])) {
        $response = wp_remote_get('https://jetpack.wordpress.com', array(
            'timeout' => 30,
            'sslverify' => true,
        ));

        if (is_wp_error($response)) {
            echo '<pre>Error: ' . esc_html($response->get_error_message()) . '</pre>';
        } else {
            echo '<pre>Success! HTTP ' . esc_html(wp_remote_retrieve_response_code($response)) . '</pre>';
        }
        die();
    }
});

Then visit: https://yourdomain.com/wp-admin/?test_jetpack_connection=1

Fix 1: Update the CA Certificate Bundle

If the issue is SSL certificate validation:

# On Ubuntu/Debian
sudo apt-get update && sudo apt-get install ca-certificates
sudo update-ca-certificates

# On CentOS/RHEL
sudo yum update ca-certificates

# For PHP specifically, check which CA bundle is used
php -r "echo openssl_get_cert_locations()['default_cert_file'];"

You can also set the CA bundle path in php.ini:

[curl]
curl.cainfo = "/etc/ssl/certs/ca-certificates.crt"

[openssl]
openssl.cafile = "/etc/ssl/certs/ca-certificates.crt"

Restart your web server after making changes:

# Apache
sudo systemctl restart apache2

# Nginx with PHP-FPM
sudo systemctl restart php-fpm
sudo systemctl restart nginx

Fix 2: Configure Firewall for Outbound HTTPS

Ensure your server’s firewall allows outbound HTTPS connections:

# iptables - allow outbound HTTPS
sudo iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT

# UFW (Ubuntu)
sudo ufw allow out 443/tcp

# firewalld (CentOS/RHEL)
sudo firewall-cmd --permanent --add-port=443/tcp --zone=public
sudo firewall-cmd --reload

If your hosting provider manages the firewall, contact their support to ensure outbound HTTPS is allowed.

Fix 3: Allow xmlrpc.php Access for WordPress.com

If you have blocked xmlrpc.php for security, add exceptions for WordPress.com servers.

In .htaccess

<Files xmlrpc.php>
    # Block all by default
    Order Deny,Allow
    Deny from all

    # Allow WordPress.com / Automattic IP ranges
    Allow from 192.0.64.0/18
    Allow from 198.181.116.0/22
    Allow from 199.47.91.0/24
</Files>

In Nginx

location = /xmlrpc.php {
    # Allow WordPress.com / Automattic IPs
    allow 192.0.64.0/18;
    allow 198.181.116.0/22;
    allow 199.47.91.0/24;
    deny all;

    # Pass to PHP
    include fastcgi_params;
    fastcgi_pass unix:/var/run/php/php-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

In Seguridad Plugins

If you are using a security plugin like Wordfence, Sucuri, or iThemes Seguridad, check its settings for XML-RPC blocking and add an exception or whitelist for Jetpack.

Fix 4: Disable WordPress HTTP Blocking

Check if your wp-config.php has constants that block external requests:

// If these are in wp-config.php, they may block Jetpack
define('WP_HTTP_BLOCK_EXTERNAL', true);      // Blocks all external requests
define('WP_ACCESSIBLE_HOSTS', '...');        // Whitelist when blocking is enabled

If WP_HTTP_BLOCK_EXTERNAL is set to true, add the Jetpack hosts to the whitelist:

define('WP_HTTP_BLOCK_EXTERNAL', true);
define('WP_ACCESSIBLE_HOSTS', '*.wordpress.com,*.wp.com,jetpack.wordpress.com');

Or temporarily disable the blocking to test:

define('WP_HTTP_BLOCK_EXTERNAL', false);

Fix 5: Fix cURL Configuración

If PHP’s cURL is not working properly:

# Check if cURL is installed for PHP
php -m | grep curl

# Check cURL version and SSL support
php -r "var_dump(curl_version());" | grep -E "(version|ssl_version|protocols)"

If cURL is missing, install it:

# Ubuntu/Debian
sudo apt-get install php-curl
sudo systemctl restart apache2

# CentOS/RHEL
sudo yum install php-curl
sudo systemctl restart httpd

Fix 6: Increase PHP Timeout

If the connection times out before completing:

// In wp-config.php
define('WP_HTTP_TIMEOUT', 30);  // Increase from default 5 seconds

Or in php.ini:

max_execution_time = 60
default_socket_timeout = 60

Prevention and Monitoring

  1. Keep the server’s CA certificates updated to prevent SSL validation failures
  2. Monitor outbound connectivity from your server to WordPress.com endpoints
  3. Document firewall rules so that security hardening does not accidentally block Jetpack
  4. Use the Jetpack Debug tool periodically to verify the connection is healthy
  5. Subscribe to Jetpack status updates at https://jetpackstatus.wordpress.com/ to know about service disruptions

Resumen

The “register_http_request_failed” error in Jetpack is a connectivity problem between your WordPress server and WordPress.com. The most common causes are SSL certificate validation failures, firewalls blocking outbound HTTPS, and security measures blocking xmlrpc.php. Start by testing outbound HTTPS connectivity from the server command line with curl, verify that xmlrpc.php is accessible externally, update your CA certificate bundle, and ensure your firewall allows outbound traffic on port 443. If you have blocked XML-RPC access, whitelist WordPress.com IP ranges.