Call to undefined function xml parser create() in wp-includes/class-IXR.php:264

From lxadm | Linux administration tips, tutorials, HOWTOs and articles
Jump to: navigation, search

If you're getting the following error in your Wordpress log:

PHP Fatal error:  Uncaught Error: Call to undefined function xml_parser_create() in .../wp-includes/class-IXR.php:264\nStack trace:\n#0 .../wp-includes/class-wp-http-ixr-client.php(109): IXR_Message->parse()\n#1 .../wp-includes/comment.php(2522): WP_HTTP_IXR_Client->query('weblogUpdates.e...', '...', 'https://...', 'https://...')\n#2 .../wp-includes/comment.php(2349): weblog_ping('http://rpc.ping...')\n#3 .../wp-includes/comment.php(2283): generic_ping()\n#4 .../wp-includes/plugin.php(601): do_all_pings()\n#5 .../wp-cron.php(117): do_action_ref_array('do_pings', Array)\n#6 {main}\n  thrown in .../wp-includes/class-IXR.php on line 264

it probably means you're running PHP 7.0, but don't have XML module installed.

To fix (at least on Ubuntu 16.04):

apt-get install php-xml

You may need to reload the webserver and/or php after that.