Title: Error page cached
Last modified: June 25, 2024

---

# Error page cached

 *  Resolved [kpolljonker](https://wordpress.org/support/users/kpolljonker/)
 * (@kpolljonker)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/error-page-cached/)
 * After a small server hiccup it turned out that WP Super Cache had somehow cached
   the “Error establishing a database connection”- screen on a single page (the 
   site’s storefront). It was not shown to logged in users (as per the plugin’s 
   settings) and was only solved by clearing the cache. I’ve not provided a link
   since it’s a production site where the problem no longer exists.
 * Is there a setting I’ve missed that will prevent WP Super Cache from caching 
   such error pages, i.e. ignore pages with a non-200 HTTP code or something, or
   can I do something else to prevent this from happening in the furture?
 * Hope to hear from you soon,
 * Kinds regards

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

 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/error-page-cached/#post-17849527)
 * I wasn’t able to replicate this as the plugin does try to detect these problems.
 * If you’re willing, when your site is not busy (morning, late evening compared
   to your customers), could you test it?
 * Enable debugging on the Debug page and load the debug viewer in a new tab.
   Edit
   your wp-config.php and either directly change the `define( 'DB_PASSWORD',` line
   or put a check around the modified version on a particular page:
 *     ```wp-block-code
       if ( $_SERVER['REQUEST_URI'] === '/test/' ) {    define( 'DB_PASSWORD', 'test' );} else {    define( 'DB_PASSWORD', 'my database password' ); // use your own password here.}
       ```
   
 * Now, visit /test/ or whatever page you’ve chosen in a logged out browser and 
   if you see the database error, check the debug log. Also check the actual wp-
   content/cache/supercache/ directory on your server.
 * Are you still seeing a cached page? Is the debug log saying it’s creating when*
   you* visit? Do you have a code wrapper around that error message that might be
   interfering with how it works, such as in your theme?
 *  Plugin Support [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/error-page-cached/#post-17865106)
 * Hi there, [@kpolljonker](https://wordpress.org/support/users/kpolljonker/),
 * Do you have updates about that? We usually close inactive threads after one week
   of no movement, but we want to make sure we’re all set before marking it as solved.
   Thanks!
 *  Thread Starter [kpolljonker](https://wordpress.org/support/users/kpolljonker/)
 * (@kpolljonker)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/error-page-cached/#post-17871259)
 * Hiya,
 * Thanks for the reply, I’ve tried your steps on a staging site but could unfortunately
   not reproduce the cached error page, I assume it was a one-time glitch. The plugin
   does not seem to cache the error page when I’m trying to make it do so.
 * I’ll keep an eye on it but don’t expect it to happen again, thanks for your time!
 *  Plugin Support [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/error-page-cached/#post-17877488)
 * Hi there, [@kpolljonker](https://wordpress.org/support/users/kpolljonker/),
 * Thanks for the follow-up, and we hope it has been a glitch indeed – that means
   you will be all set for a long while 🤞
 * I’m going to mark this thread as solved. If you have any further questions or
   need more help, you’re welcome to open another thread here. Cheers!

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

The topic ‘Error page cached’ 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

 * [error-page](https://wordpress.org/support/topic-tag/error-page/)
 * [settings](https://wordpress.org/support/topic-tag/settings/)

 * 4 replies
 * 3 participants
 * Last reply from: [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/error-page-cached/#post-17877488)
 * Status: resolved