I had the same problem on my site and this post helped. I just searched for how to remove spaces in front of <?xml. The solution that worked for me was to check my PHP files for spaces or other unseen characters before the first <?php tag in every file included / required to render the page producing the error. According to the advice I found, this is a known issue with PHP and also goes for any characters after the last ?> tag. (Including “\n” – line feed character). I hope this helps someone speed up their fault find.