{"id":121,"date":"2014-03-14T09:00:38","date_gmt":"2014-03-14T09:00:38","guid":{"rendered":"http:\/\/www.dessol.com\/blog\/?p=121"},"modified":"2014-04-07T10:09:47","modified_gmt":"2014-04-07T09:09:47","slug":"overcome-broken-rss-feeds-wordpress","status":"publish","type":"post","link":"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/","title":{"rendered":"Overcome broken RSS feeds in WordPress"},"content":{"rendered":"<p class=\"lead\">If you are seeing the words <strong>&#8220;error on line 2 at column 6: XML declaration allowed only at the start of the document&#8221;<\/strong> when you try visiting your WordPress blog&#8217;s RSS feed, then you are not alone. It seems that there are issues with some installations where whitespace amongst core files is causing XML errors. Until WordPress fix this we suggest you follow the following tutorial, using suggestions written by\u00a0<a title=\"Peter Krzyzek | Amazing Experiences\" href=\"http:\/\/www.piotrkrzyzek.com\/\" target=\"_blank\">Peter Krzyzek<\/a>.<\/p>\n<h2>Firstly<\/h2>\n<p>Firstly download this file\u00a0<a href=\"http:\/\/wejn.org\/stuff\/wejnswpwhitespacefix.php\">http:\/\/wejn.org\/stuff\/wejnswpwhitespacefix.php<\/a>. We have checked the file and we can assure you it is virus free!<\/p>\n<h2>Secondly<\/h2>\n<p>Put the file in the ROOT directory of your WordPress installation &#8211; i.e. next to the wp-config file.<\/p>\n<h2>Thirdly<\/h2>\n<p>Open the index.php file in the ROOT directory and add the following code inside the php tags, but above any content.<\/p>\n<pre><code class=\"php\">include(\"wejnswpwhitespacefix.php\");\r\n<\/code><\/pre>\n<p>So your file should look like<\/p>\n<pre><code class=\"php\">&lt;?php\r\ninclude(\"wejnswpwhitespacefix.php\");\r\ndefine('WP_USE_THEMES', true);\r\nrequire('.\/wp-blog-header.php');\r\n<\/code><\/pre>\n<p>And voila! Your problem with broken RSS feeds should be a thing of the past!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are seeing the words &#8220;error on line 2 at column 6: XML declaration allowed only at the start of the document&#8221; when you try visiting your WordPress blog&#8217;s RSS feed, then you are not alone. It seems that there are issues with some installations where whitespace amongst core files is causing XML errors&#8230;.<\/p>\n<p><a href=\"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/\" class=\"more-link\" title=\"Read Overcome broken RSS feeds in WordPress\"><span class=\"label label-primary\">Read more &raquo;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":56,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,15,16],"tags":[],"class_list":["post-121","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-snippets","category-php-code-snippets","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Overcome broken RSS feeds in Wordpress - Web Design &amp; Development Lowestoft Blog| Dessol<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Overcome broken RSS feeds in Wordpress - Web Design &amp; Development Lowestoft Blog| Dessol\" \/>\n<meta property=\"og:description\" content=\"If you are seeing the words &#8220;error on line 2 at column 6: XML declaration allowed only at the start of the document&#8221; when you try visiting your WordPress blog&#8217;s RSS feed, then you are not alone. It seems that there are issues with some installations where whitespace amongst core files is causing XML errors....Read more &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Design &amp; Development Lowestoft Blog| Dessol\" \/>\n<meta property=\"article:published_time\" content=\"2014-03-14T09:00:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-04-07T09:09:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dessol.com\/blog\/wp-content\/uploads\/2014\/01\/php-code-snippet.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"780\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"dessol\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dessol\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/\",\"url\":\"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/\",\"name\":\"Overcome broken RSS feeds in Wordpress - Web Design &amp; Development Lowestoft Blog| Dessol\",\"isPartOf\":{\"@id\":\"https:\/\/www.dessol.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dessol.com\/blog\/wp-content\/uploads\/2014\/01\/php-code-snippet.jpg\",\"datePublished\":\"2014-03-14T09:00:38+00:00\",\"dateModified\":\"2014-04-07T09:09:47+00:00\",\"author\":{\"@id\":\"https:\/\/www.dessol.com\/blog\/#\/schema\/person\/bb13ecb8e4b05dee2d7ec34d4a2af362\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/#primaryimage\",\"url\":\"https:\/\/www.dessol.com\/blog\/wp-content\/uploads\/2014\/01\/php-code-snippet.jpg\",\"contentUrl\":\"https:\/\/www.dessol.com\/blog\/wp-content\/uploads\/2014\/01\/php-code-snippet.jpg\",\"width\":780,\"height\":300,\"caption\":\"PHP Code Snippet\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dessol.com\/blog\/#website\",\"url\":\"https:\/\/www.dessol.com\/blog\/\",\"name\":\"Web Design &amp; Development Lowestoft Blog| Dessol\",\"description\":\"Work, news and murmerings\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dessol.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dessol.com\/blog\/#\/schema\/person\/bb13ecb8e4b05dee2d7ec34d4a2af362\",\"name\":\"dessol\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.dessol.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/36a894164074bc1f6a20492e1d14ddc1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/36a894164074bc1f6a20492e1d14ddc1?s=96&d=mm&r=g\",\"caption\":\"dessol\"},\"url\":\"https:\/\/www.dessol.com\/blog\/author\/dessol\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Overcome broken RSS feeds in Wordpress - Web Design &amp; Development Lowestoft Blog| Dessol","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/","og_locale":"en_GB","og_type":"article","og_title":"Overcome broken RSS feeds in Wordpress - Web Design &amp; Development Lowestoft Blog| Dessol","og_description":"If you are seeing the words &#8220;error on line 2 at column 6: XML declaration allowed only at the start of the document&#8221; when you try visiting your WordPress blog&#8217;s RSS feed, then you are not alone. It seems that there are issues with some installations where whitespace amongst core files is causing XML errors....Read more &raquo;","og_url":"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/","og_site_name":"Web Design &amp; Development Lowestoft Blog| Dessol","article_published_time":"2014-03-14T09:00:38+00:00","article_modified_time":"2014-04-07T09:09:47+00:00","og_image":[{"width":780,"height":300,"url":"https:\/\/www.dessol.com\/blog\/wp-content\/uploads\/2014\/01\/php-code-snippet.jpg","type":"image\/jpeg"}],"author":"dessol","twitter_misc":{"Written by":"dessol","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/","url":"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/","name":"Overcome broken RSS feeds in Wordpress - Web Design &amp; Development Lowestoft Blog| Dessol","isPartOf":{"@id":"https:\/\/www.dessol.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dessol.com\/blog\/wp-content\/uploads\/2014\/01\/php-code-snippet.jpg","datePublished":"2014-03-14T09:00:38+00:00","dateModified":"2014-04-07T09:09:47+00:00","author":{"@id":"https:\/\/www.dessol.com\/blog\/#\/schema\/person\/bb13ecb8e4b05dee2d7ec34d4a2af362"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.dessol.com\/blog\/overcome-broken-rss-feeds-wordpress\/#primaryimage","url":"https:\/\/www.dessol.com\/blog\/wp-content\/uploads\/2014\/01\/php-code-snippet.jpg","contentUrl":"https:\/\/www.dessol.com\/blog\/wp-content\/uploads\/2014\/01\/php-code-snippet.jpg","width":780,"height":300,"caption":"PHP Code Snippet"},{"@type":"WebSite","@id":"https:\/\/www.dessol.com\/blog\/#website","url":"https:\/\/www.dessol.com\/blog\/","name":"Web Design &amp; Development Lowestoft Blog| Dessol","description":"Work, news and murmerings","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dessol.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.dessol.com\/blog\/#\/schema\/person\/bb13ecb8e4b05dee2d7ec34d4a2af362","name":"dessol","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.dessol.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/36a894164074bc1f6a20492e1d14ddc1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/36a894164074bc1f6a20492e1d14ddc1?s=96&d=mm&r=g","caption":"dessol"},"url":"https:\/\/www.dessol.com\/blog\/author\/dessol\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dessol.com\/blog\/wp-json\/wp\/v2\/posts\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dessol.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dessol.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dessol.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dessol.com\/blog\/wp-json\/wp\/v2\/comments?post=121"}],"version-history":[{"count":9,"href":"https:\/\/www.dessol.com\/blog\/wp-json\/wp\/v2\/posts\/121\/revisions"}],"predecessor-version":[{"id":136,"href":"https:\/\/www.dessol.com\/blog\/wp-json\/wp\/v2\/posts\/121\/revisions\/136"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dessol.com\/blog\/wp-json\/wp\/v2\/media\/56"}],"wp:attachment":[{"href":"https:\/\/www.dessol.com\/blog\/wp-json\/wp\/v2\/media?parent=121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dessol.com\/blog\/wp-json\/wp\/v2\/categories?post=121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dessol.com\/blog\/wp-json\/wp\/v2\/tags?post=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}