WordPress Parsing Errors

If your connection to a WordPress blog is failing with a vague “WordPress XML parser” failure, it probably means that something is interfering with your blog’s ability to decode the messages that MarsEdit is sending to it. There are a few common causes for this problem:

  • Conflicting Plugins. If your blog is self-hosted, you might have installed a plugin that is causing WordPress’s default XML processing to fail for some reason. If possible, experiment with disabling all, or most of your plugins, and see if that improves the problem. If it does, see if you can zero in on the problematic plugin by enabling plugins one at a time until the problem reappears. You may need to contact the plugin developer to see if they can fix the problem, or find another plugin to achieve the same functionality.
  • Missing Server Libraries. WordPress relies upon certain libraries that are not contained in WordPress itself, but must be present on the hosting server in order for it to function. If you are seeing WordPress XML parser failures, there is a good chance you are missing the PHP Libxml library. An easy way to test which PHP libraries are installed on your server is to create a simple php file on your site, for example “phpinfo.php”:
    <?php
    phpinfo()
    ?>
    

    Now when you visit https://[yoursite]/phpinfo.php you should see a list of all the PHP libraries that are available to WordPress. Scroll to the bottom and find the “Credits” section. Ensure that at least “XML” and “xmlrpc” modules are listed. You may need to use aptitude or similar package manager to install the “php-xml” and “php-xmlrpc” modules on your host.

WordPress Error Log

If you are still having trouble after checking both of these common causes, you may gather more information by examining the WordPress error log. Usually this is off by default, but can be enabled by setting the WP_DEBUG_LOG setting in your wp-config.php file:

define('WP_DEBUG_LOG', true);

By default WordPress logs to the “debug.log” file in your “wp-content” folder. You may need to ensure that your web server’s group has write access to the debugging log file.

PHP Error Log

Another place to look for clues is the PHP error logs on your server. To see if they are enabled, and where they are stored, visit the “phpinfo.php” page you created above, and look for “error_log” in the output. It will show the path where logs are being written, if they are. Search that log file for errors correlated to the time when you are trying to connect to your blog. If you don’t see an error_log, you may need to enable PHP logging by editing your php.ini file.

If you are still having trouble, please get in touch and we’ll help you solve the problem.