Troubleshoot blank lines or extra content in your site’s XML-RPC file.
Sometimes, when trying to connect Jetpack to your WordPress.com account, you’ll receive the following error:
Error Details: The Jetpack server could not communicate with your site’s XML-RPC URL. Please check to make sure yourjetpack.blog/xmlrpc.php is working properly. It should show ‘XML‑RPC server accepts POST requests only.’ on a line by itself when viewed in a browser and should not have any blank lines or extra output anywhere.
This usually happens when there is a problem with the wp-config.php file, a plugin, or the theme on your site.
A working example of an XML-RPC file can be seen at https://wp.cloud/xmlrpc.php
Check the xmlrpc.php file
To check your site’s xmlrpc.php file:
- Go to https://{yourjetpack.blog}/xmlrpc.php. (Replace {yourjetpack.blog} with your actual URL.
- You should see a single line:
XML‑RPC server accepts POST requests only. - If you see blank spaces above that message or extra text, that’s most likely because some plugin, theme, or your site’s
wp-config.phpfile has extra “blank spaces” (new lines, spaces, tabs, …) before the first<?phpin the file.
Troubleshooting
To solve this issue of blank lines in your XML-RPC file, try the following:
- Deactivate all plugins on your site, and see if that gets rid of the extra blank space. Then, activate your plugins one at a time to determine which one is responsible.
- If that doesn’t help, you can rule out a theme conflict by temporarily changing your site’s theme to a default theme (such as Twenty Seventeen) and trying again.
- Replace the file
xmlrpc.phpfrom your site root manually via FTP. - If you continue to experience issues, you’ll need to open your site’s
wp-config.phpfile in a file editor, and make sure no blank space was added before the first<?phpin the file.
This problem is another symptom of a more common problem: the “Headers already sent” problem.
If that doesn’t help, you can follow the troubleshooting steps listed on this page to find out more about the issue on your site.
Still need help?
Please contact support. We’re happy to advise.