Clear login cache
-
Hi,
We were wondering if there is a way to completely clear the cache for login. Unfortunately, the cache is causing issues for people trying to login. Hope you can help.
The page I need help with: [log in to see the link]
-
Hi there,
You can exclude specific pages in the advanced settings, and by default logged-in users aren’t served cached content.
Could you describe the issues specifically?
Best regards,
Marc.
@marcusig I have a similar problem. Users can’t login, even the adminsitrator. This is happening after I modified the settings.
I am locked out. How can I fix this?
Website: https://academiamunicipal.uned.ac.cr/-
This reply was modified 6 years, 7 months ago by
marbaque.
@marbaque The plugin shouldn’t cache anything related to the administration. Are you login in via the regular wp-login.php form?
Do you have a URL I can look at?
Marc.
Thank you @marcusig , what could be causing this?
@marbaque can you explain what the expected behaviour is on your website? Clicking “Ingresar” in the top bar leads to the login page, which seems correct.
When enter user and pass, it takes me back to a non logged in state.
What is your setting “Serve cached pages to logged in users” set to?

I might have turned that on by mistake. Is there a way to take this back? Is deleting the plugin a solution?
@marbaque If you’re using that link at the top of the page: https://academiamunicipal.uned.ac.cr/wp-login.php?redirect_to=https%3A%2F%2Facademiamunicipal.uned.ac.cr%2F, it will always redirect you to the homepage. (because of
?redirect_to=https%3A%2F%2Facademiamunicipal.uned.ac.cr%2)What happens when you visit https://academiamunicipal.uned.ac.cr/wp-admin/ after trying to login?
Visiting https://academiamunicipal.uned.ac.cr/?nocache=1 will also show you the page without cache.
Thank you @marcusig … with that link I was able to go to the dashboard. I unchecked that option already, and it seems to be working normally.
@marbaque Great.
@claudiacc has the above information helped you?
Marc.
-
This reply was modified 6 years, 7 months ago by
Marc Lacroix.
Hi @marcusig,
Unfortunately no. When users click on the login at the top right they are not able to login. I also followed the instruction above but no luck so far.
Maybe you can help 🙂
Hi @claudiacc,
I looked at your page, and the login form uses a security code (it looks like a WordPress “nonce”).
When that code expires, the login process will fail.
You could try to reduce the cache lifespan to a few hours.
Ideally, the login form shouldn’t be using a “nonce”. Though you might not be able to change that.Marc.
Hi @marcusig,
Thank you so much for the info. In the Theme plugin I saw this below, do you think that I can change that?
// First check the nonce, if it fails the function will break
check_ajax_referer( ‘ajax-login-nonce’, ‘security’ );// Nonce is checked, get the POST data and sign user on
$info = array();
$info[‘user_login’] = sanitize_text_field($_POST[‘username’]);
$info[‘user_password’] = $_POST[‘password’];
$info[‘remember’] = true;@claudiacc What do you mean by “In the Theme plugin”?
That line
check_ajax_referer( ‘ajax-login-nonce’, ‘security’ );seems to be what causes the issue.I would discourage editing files in your theme, unless if it’s a custom theme or a child theme. Otherwise any edits you made might be overridden when a new update of that theme is released.
Marc.
-
This reply was modified 6 years, 7 months ago by
The topic ‘Clear login cache’ is closed to new replies.