WordPress RSS Feed XML Error How to Fix
How to fix the RSS Feed error in WordPress like XML parsing error unclosed CDATA section, feed could not be found, etc
I. RSS Feed Problem in WordPress
Variation of error messages. The followings are some of them:
- RSS Error: XML error: unclosed CDATA section at line 72, column 55
- RSS Error: XML error: unclosed CDATA section at line 41, column 55
- RSS Error – The feed could not be found
- line 82, column 0: XML parsing error: :82:55: unclosed CDATA section
- line 93, column 0: XML parsing error: <unknown>:93:55: unclosed CDATA section
- The URL does not appear to reference a valid XML file. We encountered the following problem: Error on line 82: XML document structures must start and end within the same entity -> this error message occur when you try to integrate the feed to Feedburner.
There is no single factor which might cause this RSS Feed error in wordpress. But WordPress expert agree that at least these following factors may become one of the culprit:
- WordPress plugins: one or more WordPress plugins you installed might cause the mess. In fatihsyuhud.com’s case, it’s W3 Total Cache which causes the RSS Feed error. So, I deactivate and delete it.
- Blank space: a blank space in <?php ?> might cause RSS Feed error.
- Bad themes: some themes incompatible with the WordPress version you are using.
- A bad post. a bad post is perhaps causing RSS feeds to not work correctly.
- PHP being compiled without the curl option.
- Others uncommon causes.
In my case, W3 Total Cache might be (not surely) the culprit. Particularly, if you enable the Minify setting. A Hostgator technician said:
The page appears to be minified, which is a process that removes unnecessary lines/characters from source code. Do you know what was used to minify this? It may have truncated the CDATA section.
To know if there’s a problem with your WordPress RSS Feed is easy, just go to feedvalidator.org and enter your blog feed in the box
IV. The Solutions how to fix it
After identifying the problems, you might know the solution to fix it. Everytime you try one solution, validate your blog feed via feedvalidator.org to make sure which one is working
- If the problem is related to one or more plugins, disable it (them), etc.
- If the problem is related to the theme you are using, change the theme.
- If the cause is blank/white space in <?php ?>, install Fix RSS Feed plugins to make it right. To correct things manually, follow this useful guide.
- Check your wp-rss2.php and wp-atom.php files for blank lines outside of bracketed sections.
- Check your wp-config.php file for blank lines outside of <? and ?> bracketed sections.
- Check your theme’s functions.php file for blank lines outside of <? and ?> bracketed sections.
- One by one, disable plugins and revalidate until you isolate the one causing the problem.
- If the above two points are not solving your problem, try one of these tips below:
- Insert / comment the line in the function in wp-includes/template-functions-post.php file line 57 with the folowing code:
// $content = str_replace(']]>', ']]>', $content); - Edit php.ini
- Go to php.ini (ask your hosting administrator to setting your php.ini)
- Search for “shell_exec”
- Enable this function “shell_exec”
- If the feed error is caused by a bad post, try to locate which post that cause the error and follow this tips everytime you write a post / article:
- Avoid composing and copying content from Word into your blogging tools.
- “Clean” copied text by pasting it into a plain text editor, such as Notepad (Windows) or TextEdit (Mac) and the copying the newly cleaned text before pasting it into your blogging application.
- Insert / comment the line in the function in wp-includes/template-functions-post.php file line 57 with the folowing code:


Kalau di blogger / blogspot gimana mas?
I tried all the above options… Plugin, custome code to remove blank lines and pluging deactiations etc.. But finally the article at globinch helped me. I searched for all my recently changed files and removed spaces as mentioned there..
makasih mas atas infonya, kami yang msh newbie benar2 terbantu…