If you are having an issue logging into the WordPress Admin for your site, read on. Specifically, it seems that the WordPress login authentication completes. However, there is a redirect loop which is cyclic and recursive, so the browser eventually gives up.
- Shared hosting based on LAMP
- Static Cache, Dynamic Cache (varnish) and memcached enabled
- WooCommerce along with a bunch of other useful plugins including Yoast SEO, Google Analytics by SEO, Revision Control, AKismet and a few others.
- Theme: WooCanvas by WooThemes
A couple of days back, a new version of WooCommerce was available. Thinking nothing of it, I just clicked the upgrade button on it. I like to keep everything updated to avoid zero-day exploits. The upgrade seemed to complete successfully without any noticeable issues.
The following day, I logged into my hosting account and noticed I was using the Google PageSpeed module for caching. With my host, if you enable Google PageSpeed, it disables all the other 3 kinds of caching mechanisms. These caching mechanisms are Static Cache, Dynamic Cache and memcached. All 3 of these caching schemes are at the hosting interface. I should mention that the site is hosted at Siteground.
Caching (at hosting server)
When I noticed that Google PageSpeed was not giving me acceptable speed, I decided to disable it and re-enable the 3 Siteground provided caching schemes. I enabled Static Caching, Dynamic Caching (varnish) and also memcached. From what I understand, memcached stores the dynamic database related objects in RAM to avoid database server latency.
Little did I know that this would cause me huge trouble. Specifically, I was unable to login to the WordPress Admin of the site after I did this. At the time though, I did not know that enabling “memcached” had somehow led to this lockout.
Redirection after login
Specifically, I was being redirected from any Admin page to the ‘wc-about’ page within WooCommerce Admin. I used the FireBug console to determine as much. The redirect however would not work and the browser would give up after a few times of constant redirect. I believe it was an endless redirect loop.
At first, I logged a ticket with Siteground to determine what had caused this disruption. As usual Siteground responded promptly (a good thing). However, their response was not exactly helpful. They said they had tried several different things, but nothing worked. This included renaming the “plugins” folder, disabling all the plugins, reloading stock .htaccess. I should also clarify that the site itself was totally operational from the front end. There were no issues at all browsing the front end of the site. It also loaded a bit quicker now that all 3 caching schemes were enabled.
As disappointed as I was with the response from Siteground, I was determined to get to the root cause of the issue. After a couple of hours of trying a few different things, I finally narrowed it down. It turned out that if I disabling the “WooCommerce” plugin, the problem disappeared. This was consistent because the “wc-about” page is a WooCommerce Admin page. It made sense that WooCommerce was somehow tied into the equation.
The next step however was not so simple. I stumbled upon the caching setup once again. This time, however, I only disabled memcached. Voila! That seemed to fix it.
Possible memcached conflict/interaction with WooCommerce upgrade
At this point, I believe that there is some play between enabling memcached on a newly upgraded WooCommerce plugin. Somehow, the upgrade process did not complete fully maybe? I do not recall if the “wc-about” page was displayed after WooCommerce was upgraded. Once I disabled “memcached“, logging into the WordPress Admin, I was greeted immediately by the “wc-about” page.
I hope this helps someone who is locked out of their WordPress Admin after upgrading WooCommerce. Who knows if this could have happened while upgrading any other plugin as well? Let me know if you have seen this issue.