Alexandra Batrak
Alexandra Batrak

Reputation: 106

Wordpress front-end only works when logged in as an admin

Front-end of WordPress doesn't work - shows a white box with no text, just body tags. I'm using XAMPP, local development. When logged in everything works. I don't know if it will be the same on a live server, haven't tried yet, but seems like a weirdly persistent issue.

It was working fine, until 5.1 updates, but I mostly was logged in during development, so cannot pinpoint the exact time when it started.

I have the WordPress reinstalled from the dashboard, the theme doesn't affect it - it has the same issue on WordPress standard themes. Plugins/no plugins - doesn't affect it either. Cleaned cache multiple times (wp, browser). My last resort would be to reinstall Wordpress completely in Xampp, but thought, maybe such drastic measure isn't required. It is the same in every browser.

The has nothing in it, literally.

If anyone knows, what could be the issue? It doesn't show any errors.

Upvotes: 1

Views: 3243

Answers (2)

Alexandra Batrak
Alexandra Batrak

Reputation: 106

TL;DR Maintenance mode with missing maintenance.php was throwing white page with 500 Server Error.


This is probably not going to be helpful to many people, yet I feel that I have to update this as I found the problem causing this.

I have moved the theme a lot: from local to hosting, back to local dev, had my HDD replaced, etc. It's been a while and I overlooked one major thing. I haven't touched the theme code for almost 3 years, and a couple of days ago I decided to go through it with a completely fresh install of WordPress. And I have found after inspecting all the files, what was causing it now. I do feel a bit stupid for how simple the solution to my issue is.

It's the maintenance mode. I had maintenance mode activated and while moving the theme files around maintenance.php got removed. facepalm

Upvotes: 2

Brijesh Dhanani
Brijesh Dhanani

Reputation: 886

There might be an error in your browser's console window. If there is any error then it might causes issue for loading stylesheets.

Upvotes: 0

Related Questions