It has been over one year since I have disabled W3 Total Cache and the problem has not reoccurred, thus leading me to suspect the problem was caused by W3 Total Cache since the problem only occurred when I was using W3 Total Cache.
I now suspect the login problem is caused by W3 Total Cache.
It has been about 2 months since I disabled it because I kept getting site errors – including login errors. The errors have stopped.
My recommendations are: (1) try to login in using the techniques described here, (2) empty your W3 Total Cache caches, (3) disable W3 Total Cache.
- you have W3 Total Cache installed and enabled when you get this problem, or
- you get this problem but have some other caching plugin installed, or
- you have no caching module installed and you still get this problem.
This is a real problem because I get a steady stream of hits on this page and, aside from this article, I don’t know of any real solutions to this problem. All other articles seem to be of the “do something (like touching file permissions) and the problem magically goes away” variety.
In February 2012, it happened again. After waiting 48 hours for the problem to resolve itself – and it didn’t – I began troubleshooting again. Fortunately, I had a few more facts this time around and a lot less panic or worry about having my site having been hacked.
What I knew: (1) my site was still accessible, (2) other people did not have problems leaving comments (during that time I received 1 legitimate comment, 3 SPAM comments, and 1 pingback) – even though I wasn’t able to leave a comment. (I tried a different computer, I tried a different browser, I tried a different OS, I tried a different IP address (depending on what type of Internet connection you have, turning your modem on and off may get you a new IP address) but none of them worked. The only thing I didn’t try for logging in from someone else’s Internet connection.)
I was able, though not consistently, to login by clicking on an action link in the e-mail WordPress sends me to tell me I have a new comment (since I have comment moderation turned on, WordPress e-mails me every time there is a new comment). Even if I was able to login, I was not able to do a lot in the Admin panel (replying to or deleting comments wouldn’t work).
I checked the WordPress error logs, there was nothing in them to suggest a problem.
I searched the web for solutions. Again, nothing useful came of it – lots of people have experienced this problem, but no useful solutions were offered (and those that were offered were more of the “do something – anything – and the problem will miraculously go away” type.
Checking my server logs, I could see 404 pages being delivered when I tried to log in. Nevertheless, the pages in question should exist (and I double checked that they did), so it didn’t make sense that they couldn’t be found.
Finally, while studying the WordPress login help page, and double checking everything on the page (even those I didn’t think made sense), I decided to try manually resetting my site’s URL as described in the section Site URL Redirecting. This worked! And it was reproducible – if I changed my URL I was able to login, if I set it back to the original URL I couldn’t login. This was good because a reproducible problem means the solution works – I think.
My original site URL was http://complete-concrete-concise.com – notice the lack of the www.prefix. While my site was and continues to be accessible without using www. before the name, when I changed it to http://www.complete-concrete-concise.com my login problem went away. And when I removed the www. the login problem came back.
What causes this? To be honest, I don’t know. My suspicion is it is a problem with the name server (the name server is a Internet server that looks up the site name and returns its Internet address).
For the first 8 months this site used WordPress (previously, I used Joomla!), this site used the name servers of my web host – without this problem occurring. Since switching to CloudFlare’s name servers (because I use them to relieve some of the bandwidth pressure on my web host) in December 2011, I have encountered this problem twice in 3 months. I don’t have enough evidence to conclusively claim this but others have had this problem with their web hosts
From what I can see, my DNS records with CloudFlare are fine, yet, changing my WordPress URL to use the www. prefix solves the issue – at least for now).
- the problem is an improperly resolved URL
- your site can be accessed with or without the www. prefix
- cPanel is your website administration panel provided by your webhost
Always make a backup before making any changes
1) Login to your web hosting control panel. This is not your WordPress admin panel. For many users this will be cPanel, but your webhost my provide you with a different website administration panel.
2) Click on the phpMyAdmin icon:
3) Click on your WordPress database in the left-hand side panel. If, like me, you run several websites from one account, you will have to find the appropriate database (in my case, it is not too hard, since I have one Joomla! site and one WordPress site and the database names are pretty obvious):
4) Click on wp_options in the left-hand side panel:
5) Locate the option name siteurl and click on Edit:
6) Change the URL name to your alternate one. My original URL was http://complete-concrete-concise.com. I changed it to include the www. prefix. If your original URL contains the www. prefix, and you have set up your name server to serve both versions, then remove the www. prefix. Click on Go to save the settings:
7) Check that you are able to login in to your website.
Obviously, I would love to get feedback on this. I am still unclear on where the problem lies – is it a web hosting problem? is it a name server problem? is it a WordPress problem?
It also lends weight to the argument that it might be a DNS issue.
www.prefix has, once again, fixed the problem.