For days now, I’ve been banging my head against the wall on a problem with a WordPress website (not this one). I used an agency to develop a theme for me, but every time I applied it to the site, I lost access to the /wp-admin pages (in most browsers I saw a blank page, except in Firefox, where I could see the following characters: ). I only have access to the WordPress application (no database administration, or access to the web server itself), so the only way out was to ask the server administrators to restore the WordPress folders from backup, which takes time and gets embarrassing after a second attempt.
I’d seen John MacMenamin’s WordPress WP-Admin blank page fix post and thought I’d removed all whitespace from the top/bottom of functions.php but, after Alex Coles suggested that I look at the differences between Unix-style linefeeds and Windows carriage-return/linefeeds,
I spotted the same strange characters at the head of the file (they showed up in windiff.exe as I was performing a file comparison). I don’t know how it got there but, each time I get a theme update, I have to manually remove what appeared to be a single byte from the head of the file using the nano editor on my Mac, which presented it as white space (I’m sure vi would do the job too), because not all text editors can see the offending character (certainly not Notepad on Windows, or TextEdit on a Mac).
This cost me a lot of time (and probably delayed the launch of the website too), so I thought it might be useful to flag up for others to benefit from my experience.
Leave a Reply