Title: Clear login cache
Last modified: September 30, 2019

---

# Clear login cache

 *  Resolved [CC / Caroline Claudia](https://wordpress.org/support/users/claudiacc/)
 * (@claudiacc)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fclear-login-cache%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/clear-login-cache/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/clear-login-cache/page/2/?output_format=md)

 *  [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * (@marcusig)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11988503)
 * 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.
 *  [marbaque](https://wordpress.org/support/users/marbaque/)
 * (@marbaque)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11989679)
 * [@marcusig](https://wordpress.org/support/users/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/](https://academiamunicipal.uned.ac.cr/)
    -  This reply was modified 6 years, 7 months ago by [marbaque](https://wordpress.org/support/users/marbaque/).
 *  [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * (@marcusig)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11989692)
 * [@marbaque](https://wordpress.org/support/users/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.
 *  [marbaque](https://wordpress.org/support/users/marbaque/)
 * (@marbaque)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11989703)
 * Thank you [@marcusig](https://wordpress.org/support/users/marcusig/) , what could
   be causing this?
 * [https://academiamunicipal.uned.ac.cr/](https://academiamunicipal.uned.ac.cr/)
 *  [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * (@marcusig)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11989746)
 * [@marbaque](https://wordpress.org/support/users/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.
 *  [marbaque](https://wordpress.org/support/users/marbaque/)
 * (@marbaque)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11989761)
 * When enter user and pass, it takes me back to a non logged in state.
 *  [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * (@marcusig)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11989773)
 * What is your setting “Serve cached pages to logged in users” set to?
 * ![](https://i0.wp.com/i.postimg.cc/kghP9hX0/wpo-screenshot-settings.png?ssl=1)
 *  [marbaque](https://wordpress.org/support/users/marbaque/)
 * (@marbaque)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11989861)
 * I might have turned that on by mistake. Is there a way to take this back? Is 
   deleting the plugin a solution?
 *  [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * (@marcusig)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11989927)
 * [@marbaque](https://wordpress.org/support/users/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](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/](https://academiamunicipal.uned.ac.cr/wp-admin/)
   after trying to login?
 * Visiting [https://academiamunicipal.uned.ac.cr/?nocache=1](https://academiamunicipal.uned.ac.cr/?nocache=1)
   will also show you the page without cache.
 *  [marbaque](https://wordpress.org/support/users/marbaque/)
 * (@marbaque)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11990008)
 * Thank you [@marcusig](https://wordpress.org/support/users/marcusig/) … with that
   link I was able to go to the dashboard. I unchecked that option already, and 
   it seems to be working normally.
 *  [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * (@marcusig)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11990022)
 * [@marbaque](https://wordpress.org/support/users/marbaque/) Great.
 * [@claudiacc](https://wordpress.org/support/users/claudiacc/) has the above information
   helped you?
 * Marc.
    -  This reply was modified 6 years, 7 months ago by [Marc Lacroix](https://wordpress.org/support/users/marcusig/).
 *  Thread Starter [CC / Caroline Claudia](https://wordpress.org/support/users/claudiacc/)
 * (@claudiacc)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11993327)
 * Hi [@marcusig](https://wordpress.org/support/users/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 🙂
 *  [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * (@marcusig)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11997279)
 * Hi [@claudiacc](https://wordpress.org/support/users/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.
 *  Thread Starter [CC / Caroline Claudia](https://wordpress.org/support/users/claudiacc/)
 * (@claudiacc)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11998433)
 * Hi [@marcusig](https://wordpress.org/support/users/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;
 *  [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * (@marcusig)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/#post-11998508)
 * [@claudiacc](https://wordpress.org/support/users/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.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/clear-login-cache/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/clear-login-cache/page/2/?output_format=md)

The topic ‘Clear login cache’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 18 replies
 * 3 participants
 * Last reply from: [CC / Caroline Claudia](https://wordpress.org/support/users/claudiacc/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/clear-login-cache/page/2/#post-12009906)
 * Status: resolved