Title: Cache password protected content
Last modified: July 22, 2017

---

# Cache password protected content

 *  [Juanfrito](https://wordpress.org/support/users/juanfrito/)
 * (@juanfrito)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/cache-password-protected-content/)
 * Hi there,
 * Let me begin just saying thanks for a great plugin.
 * That said, my problem is trying to cache a password protected website. I know
   caching pages once a user has logged in is not security-wise, but what I have
   set up is just a plugin (Ben Huson’s [password-protected](https://wordpress.org/plugins/password-protected/))
   protecting my entire WP frontend.
 * At first, Wp Super Cache didn’t cache anything (although everything seemed to
   be correct, config, paths, I could see that it even tried to cache the index,
   there was a file ‘index.html’ inside the cache folder).
 * I then disabled the password protection and super-cache worked nice and fine.
   But then I re-enabled password protection and users got the cached version without
   being asked for the password.
 * To sum it up:
    -Supercache doesn’t cache password protected pages (with a plugin,
   I haven’t tried with WP core password protection, but it would be a nightmare
   to protect everything this way). -If I create a cached version without password
   protection, and later enable it, the cached version doesn’t ask for a password
 * Any roundabout, or it’s just not possible to cache password protected sites?
 * Thanks
    Juan F. Vicente

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [trisager](https://wordpress.org/support/users/trisager/)
 * (@trisager)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/cache-password-protected-content/#post-9342539)
 * From the plugin description: “_This plugin generates static html files from your
   dynamic WordPress blog. After a html file is generated your webserver will serve
   that file instead of processing the comparatively heavier and more expensive 
   WordPress PHP scripts._”
 * WordPress password protection is implemented in PHP, which is being completely
   bypassed when caching is enabled.
 * There are ways around this, but nothing that I can think of that doesn’t require
   custom programming (e.g. using JavaScript to retrieve the protected content).
 * Edit: If your intention is to completely hide the website behind a login, you
   can just use basic http authentication instead of the plugin. That should work
   with WP Super Cache.
 * Many hosting companies lets you setup http authentication via their control panel,
   or you can do it yourself by editing the .htaccess file.
    -  This reply was modified 8 years, 10 months ago by [trisager](https://wordpress.org/support/users/trisager/).
 *  Thread Starter [Juanfrito](https://wordpress.org/support/users/juanfrito/)
 * (@juanfrito)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/cache-password-protected-content/#post-9343741)
 * Hi, trisager:
 * Thanks for answering, and for the hint about http authentication, though I was
   trying to avoid that.
 * Juan F. Vicente

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Cache password protected content’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [password](https://wordpress.org/support/topic-tag/password/)

 * 2 replies
 * 2 participants
 * Last reply from: [Juanfrito](https://wordpress.org/support/users/juanfrito/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/cache-password-protected-content/#post-9343741)
 * Status: not resolved