I have had this weird whitespace appear multiple times on multiple sites. By "appear" I mean, it wasn't there one day, then it was. I am the only admin on these sites, which are in the cloud. I suspect some kind of infection, but I can't figure it out. This image is from a blank site, Google cloud [happening on AWS also], fresh database, no plugins: enter image description here My previous solution was to reload these sites from Duplicator backups. That seams to have worked. This image is from a new DB and no plugins, so it must be in the core code on these sites. Since it's happening repeatedly to me, I'd like to track it down.

Does anyone know what could cause this whitespace?

  • Check your theme and plugin files -- something's sending output where it shouldn't. It could be as simple as a file having whitespace (space, tab, carriage return) after a closing ?> tag.
    – Pat J
    Commented Nov 11, 2020 at 23:06

1 Answer 1


Well that didn't take long to figure out.. enter image description here

I've dealt with this before, but could never figure it out. Obfuscated code. Impulsively I deleted the directory, but they'll be back. If you see these weird random PHP files, your site needs to be scrubbed and relaunched from backups. Preferably XML data files with no code. Reload the entire site from sources.

  • It looks like your site was compromised/hacked, likely whatever caused this was also in your latest backups, or your server wasn't configured right and has an open security hole.
    – Tom J Nowell
    Commented Nov 11, 2020 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.