JetPack related posts are not showing, WordPress says This site cannot be accessed
, and xmlrpc test shows parse error. not well formed
. Here it shows you how to fix it.
Test your site
Run below command to test your site in an terminal (Any computer is fine.)
$ curl -A "Jetpack by WordPress.com" -d "<methodCall><methodName>demo.sayHello</methodName></methodCall>" https://www.your damain.com/xmlrpc.php
The correct result should be:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<string>Hello!</string>
</value>
</param>
</params>
</methodResponse>
It is a XMLRPC parse error if the response is:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>-32700</int></value>
</member>
<member>
<name>faultString</name>
<value><string>parse error. not well formed</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>
Tips: You can also test your site using https://xmlrpc.eritreo.it/. Just input your site and click
Check
button. Other information like username and password is not needed.If it is an XMLRPC parse error, the result will be:
Code Description -32700 parse error. not well formed
Solution for parse error
Connect to your website host, run below command to install php-xml:
$ sudo apt-get install php-xml
If your host does not have apt-get
installed, you may need use (Such as AWS EC2 with Amazon Linux 2):
$ sudo yum install php-xml
Retest your site, it should be OK (Restart your apache sever if needed). After your posts are synced to WordPress site, you may see related posts.
Note: Related posts will not appear unless at least 3 good related posts can be found by JetPack. See more on jetpack related posts.
Tips: For other JectPack connection issues,fix them according to fixing jetpack connection issues.