Yesterday, I tried to clone an online website to localhost for doing some work on my theme.
I did a fresh Wordpress install on localhost and used mysqldump for copying the remote DB to localhost. I copied my theme to themes
and finally, I ran UPDATE
on site_url
and home
in wp_options
. This process worked fine for me a couple of times in the past.
After doing so, I couldn't log in: when I enter correct credentials, login.php redirects to itself without any error or warning. On entering incorrect credentials, I get the "bouncing" message that they're not right, as it should work.
This problem disappears when I UPDATE
current_theme, stylesheet and template to twentyfifteen in wp_options
.
That is, I can log in fine when twentyfifteen is activated but as soon as I activate my own theme, Wordpress asks me to log in again which I then can't anymore. Does that make any sense?
Oddly, I can see my site on localhost correctly displaying my own theme as a non logged in visitor! However, I do need the aforementioned MySQL query for setting the theme back in order to log in.
What -if anything- in my theme could cause such symptoms?
On the (OK) live version I run the Rename wp-login.php plugin. I did not install it on the problematic local site but I do see the alternative login URL in wp_options
. It seems unlikely to me that this is related to the problem but I wanted to mention this anyway.