I've installed Wordpress with Nginx and PHP-FPM on my own server at https://saskia.photo

The installation works great but the XML-RPC (used by Jetpack and the phone apps) throws the following error:

<?xml version="1.0" encoding="UTF-8"?>
          <value><string>parse error. not well formed</string></value>

You can see the error yourself by running

curl -A "Jetpack by WordPress.com" -is -H 'Content-Type: text/xml' --data '<?xml version="1.0"?><methodCall><methodName>demo.sayHello</methodName><params></params></methodCall>' 'https://saskia.photo/xmlrpc.php' && echo

I've worked through Jetpack's troubleshooting page but no luck.

The XML error returned leads me to speculate that the client request XML is being corrupted somewhere between nginx and PHP so that it cannot be parsed.

Here is my nginx config file

server {
  listen      80;
  listen      [::]:80;
  server_name saskia.photo;
  rewrite     ^   https://$server_name$request_uri? permanent;

server {
  listen                443 ssl http2;
  listen                [::]:443 ssl http2;
  server_name           saskia.photo;
  ssl_certificate       /etc/letsencrypt/live/saskia.photo/fullchain.pem;
  ssl_certificate_key   /etc/letsencrypt/live/saskia.photo/privkey.pem;

  root                  /srv/wordpress/;
  charset               utf-8;

  client_max_body_size 64M;

  # Deny access to any files with a .php extension in the uploads directory
  location ~* /(?:uploads|files)/.*\.php$ {
    deny all;

  location / {
    index index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$args;

  location ~* \.(gif|jpg|jpeg|png|css|js)$ {
    expires max;

  location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_index index.php;
    fastcgi_pass  unix:/var/run/php/wordpress.sock;
    fastcgi_param   SCRIPT_FILENAME
    include       fastcgi_params;

Has anybody seen a problem like this or can spot a problem in my config files?

  • 2
    have you installed php-xml?
    – Orphans
    Jan 5, 2017 at 10:05
  • 1
    Would you like to post the answer? Jan 5, 2017 at 10:40

1 Answer 1


It seems like the extensions php-xml and php-xmlrpc are not installed.

Install them with:

apt-get install php-xml php-xmlrpc

or (CentOS, RHEL etc..)

yum install php-xml php-xmlrpc


zypper install php-xml php-xmlrpc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .