Support » Fixing WordPress » RSS feed xml parsing error

  • Resolved befree22


    Hi Folks,

    Could someone help me fix this vexing issue with the rss feed xml parsing error below? I’ve spend too much time trying to troubleshoot it on my own.

    XML Parsing Error: XML or text declaration not at start of entity
    Line Number 6, Column 1:<?xml version="1.0" encoding="UTF-8"?>

    I read but I’ve got WP 3.3.1. I read about the blank line error at and check the following files for blank spaces after the ?> tag.



    I’d like to know which .php file is being referenced by the error code. All of the feed files above have the xml declaration in them.

Viewing 15 replies - 1 through 15 (of 20 total)
  • WordPress user, solved the problem by applying this solution

    I wanted to add the following code to solve the problem but the feed files feed-rss2.php, feed-rss2-comments.php, feed-rss.php, feed-rdf.php, feed-atom.php, feed-atom-comments.php already contain a portion of the code.

    header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
    $more = 1;
    $out = ob_get_contents();
    $out = str_replace(array("\n", "\r", "\t", " "), "", $input);

    Could someone help me fix my xml parsing error?

    All of the WordPress 3.3.1 feed files start with the following code

     * RSS2 Feed Template for displaying RSS2 Posts feed.
     * @package WordPress
    header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
    $more = 1;
    echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>

    Never, ever, edit core WordPress files! Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the Twenty Eleven theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    I created a backup of my WordPress database so that I keep the settings on my plugins when I reactivate them but is it required to do a database backup when deactivating plugins?


    I deactivated each plugin AND I installed the Default WordPress theme but I’m still getting the error. I’m surprised that the Default would return an error.

    2011 is returning the same error. Now I’m very surprised. I have other sites using 2011 and I’m experiencing no problems.

    I just posted a question about a speech bubble not displaying on a 2011 child theme but a WordPress user could view the the speech ball on his end. I have a 1 month old computer, I’m using Firefox but I wonder why I’m unable to view the speech bubble.

    I will clear the cache and test 2011 again for the feed.

    1. You still have active plugins.

    2. Try checking your wp-config.php file.

    I deactivated each plugin and reactivated it after checking the rss feed on the website. So you want me to deactivate them all and don’t reactivate them?

    Do you want the wp-config.php code? I checked that there were no spaces outside the <? > tags.

    So you want me to deactivate them all and don’t reactivate them?


    I deactivated all of the plugins per this Codex entry

    Hence, the plugins folder is now plugins.hold

    I rechecked the feed and it’s still returning an error with the plugins.hold

    There is no wp-config.php file in the themes folder. There is a and here’s the code

    global $options;
    foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } }

    The 2011 theme is also returning the rss xml error with the plugins.hold

    Now can we see your sit4e using the Twenty Eleven theme with all plugins deactivated, please?

    2011 theme activated for you 🙂

    Try re-uploading all files & folders – except the wp-content folder – from a fresh download of WordPress.

    Working on it…

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘RSS feed xml parsing error’ is closed to new replies.