1. Download the file wejnswpwhitespacefix.php
  2. Place the file in the root of the WordPress installation (in the same directory of the wp-config.php file)
  3. In the file index.php, add the following code right after the first line:
include("wejnswpwhitespacefix.php");

 

 

Source: https://piotrkrzyzek.com/wordpress-remove-blank-line-from-rss-feed-wordpress-error-on-line-2-at-column-6-xml-declaration-allowed-only-at-the-start-of-the-document/