As you may have heard, the creators of WordPress has created a new plugin called JetPack. While I will not explain it as the link to the left will explain it far easier than me (although this link is a good place to start with: Jetpack to the WP.com Cloud), I am posting about how it may have issues with Lighttpd.
When it first came out I decided to give it a try and it never worked. Posted on Twitter and people advised about disabling cache software like WP Super Cache or W3 Total Cache. Either way, it never worked. The next thing was to disable Cloudflare which also never worked.
Matt advised me to contact WordPress support and so I did. After a few e-mails, Mike from WordPress got involved. After a few e-mails back and fore, Mike finally came up with the following which I will post word by word.
Thanks 🙂 Here’s what I found out.
Background: to forge the connection, the Jetpack plugin talks to the Jetpack server (hosted at WordPress.com). The Jetpack server then makes a separate request behind the scenes back to your blog to make sure your blog is publicly accessible and configured correctly. That second request comes from jetpack.wordpress.com and goes to http://snat.co.uk/xmlrpc.php?for=jetpack
It’s that second request that is failing.
The Jetpack plugin is not even getting loaded when that http://snat.co.uk/xmlrpc.php?for=jetpack request is made. I believe this is because lighttpd or something else is using overly aggressive cacheing.
Both show “XML-RPC server accepts POST requests only.” which is the correct response.
Your site still shows the “XML-RPC server accepts POST requests only.” message, when it should show some XML likeen.blog.wordpress.com does.
I believe something similar is happening with Jetpack’s http://snat.co.uk/xmlrpc.php?for=jetpack. Your server is responding with a cached copy as if it were a request to http://snat.co.uk/xmlrpc.php, which does not load all the needed Jetpack code.
And Mike was right, it was Lighttpd. After having a look at Lighttpd and having a little test, the only logical solution I could come up with was the rewrite. And I was right. After Ricko changed it for me, JetPack worked easily. Now, this post would not be complete if I did not write what I changed it to.
url.rewrite-if-not-file = (
“^/(wp-.+).*/?” => “$0”,
“^/images/.*/?” => “$0”,
“^/temp/.*/?” => “$0”,
“^/keyword/([A-Za-z_0-9\-]+)/?$” => “/index.php?keyword=$1”,
“^/.*?(\?.*)?$” => “/index.php$1”
So if you are having a problem with XMP-PRC on Lighttpd, look at the above and give it a try.
Need to reference?
Ellis, M. (2011). Lighttpd and JetPack. [online] Snat's Narratives & Tales. Available at: https://snat.co.uk/stem/scripts/lighttpd-and-jetpack.html [Accessed 07 Dec 2023].
Steam Key Giveaway!
Every month on the final Sabbath, I take a random comment that has been posted that month and for that lucky winner they will win a random key from G2A! Join Discord for any questions or leave a comment!