You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[<code>Allowed memory size of 1337 bytes exhausted</code>](#allowed-memory-size-of-1337-bytes-exhausted)
16
+
-[<code>OOM command not allowed</code>](#oom-command-not-allowed)
17
+
-[<code>Flushing the cache causes timeout</code>](#flushing-the-cache-causes-timeout)
18
+
-[Unable to flush the cache](#unable-to-flush-the-cache)
19
+
-[Cache is flushed constantly](#cache-is-flushed-constantly)
20
+
-[Flushing the cache regularly](#flushing-the-cache-regularly)
21
+
-[How can I uninstall the cache?](#how-can-i-uninstall-the-cache)
22
+
23
+
## HELP! My site is down!1!!11!!11
7
24
8
25
The easiest way to to disable Redis on your site is deleting the `wp-content/object-cache.php` drop-in file. Alternatively, you can set the `WP_REDIS_DISABLED` constant to `true` to bypass loading it.
9
-
</details>
10
26
11
-
<details>
12
-
<summary>Plugin is incompatible with OtherPlugin</summary>
27
+
## Plugin is incompatible with OtherPlugin
13
28
14
29
Unfortunately many plugin authors don't bother testing their plugins with a persistent object cache. If you’re experiencing a compatibility issue with another plugin in combination with Redis Object Cache, please contact the support team of the **other plugin** regarding the issue.
15
30
16
31
This plugin is **not the issue**, it's just providing WordPress with `wp_cache_*()` functions for persistent caching.
If you moved all constants above those lines and the plugin still shows `Not Connected`, double check your [connection options](https://github.com/rhubarbgroup/redis-cache#connections), or ask your hosting provider for assistance.
43
-
</details>
44
56
45
-
<details>
46
-
<summary><code>connection timed out</code> and <code>read error on connection</code></summary>
57
+
## <code>connection timed out</code> and <code>read error on connection</code>
47
58
If the error occurs rarely, ignore it, Redis Server is having a hiccup. If it persists, read the answer to "Status: <code>Not connected</code>".
48
-
</details>
49
59
50
-
<details>
51
-
<summary>How can I exclude a page from the cache?</summary>
60
+
## How can I exclude a page from the cache?
52
61
53
62
Object caching caches only **objects**, not **pages**. You cannot exclude a page from using the object cache, because object caching is not URL-centric. You also cannot exclude the WordPress admin dashboard from using object caching, because then you risk the cache going stale and even loosing data.
54
63
55
64
If you’re experiencing a compatibility issue with another plugin in combination with Redis Object Cache, please contact the support team of the plugin regarding the issue and ask them to ensure it's compatible with persistent object cache backends, like Redis.
56
-
</details>
57
65
58
-
<details>
59
-
<summary>My site is getting redirected another domain</summary>
66
+
## My site is getting redirected another domain
60
67
61
68
That happens when the same `WP_REDIS_DATABASE` index is used for multiple WordPress installations. You **MUST** set a separate `WP_REDIS_DATABASE` and `WP_REDIS_PREFIX` for each domain to avoid data collision.
62
69
@@ -65,10 +72,8 @@ Once your site is being redirected, you **MUST** flush the entire Redis Server u
65
72
```bash
66
73
redis-cli -h 127.0.01 -p 6379 FLUSHALL
67
74
```
68
-
</details>
69
75
70
-
<details>
71
-
<summary>Are transients stored in Redis?</summary>
76
+
## Are transients stored in Redis?
72
77
73
78
Yes. The WordPress [Transients API](https://developer.wordpress.org/apis/transients/) will use Redis to store transients and not the `options` table.
This may be an issue with WordPress 6.1's [query caching](https://make.wordpress.org/core/2022/10/07/improvements-to-wp_query-performance-in-6-1/) feature, which you can disable by creating your own [Must Use Plugin](https://wordpress.org/documentation/article/must-use-plugins/) containing this snippet:
You either need to add the `WP_REDIS_PASSWORD` constant to your `wp-config.php` file, or move the constant above higher up in your `wp-config.php` file, above these lines:
115
113
116
114
```php
117
115
/* That's all, stop editing! Happy publishing. */
118
116
require_once(ABSPATH . 'wp-settings.php');
119
117
```
120
-
</details>
121
118
122
-
<details>
123
-
<summary><code>Allowed memory size of 1337 bytes exhausted</code></summary>
119
+
## <code>Allowed memory size of 1337 bytes exhausted</code>
124
120
125
121
This can happen when using a persistent object cache. Increase PHP's memory limit.
Alternatively, you can set the `WP_REDIS_MAXTTL` constant to something relatively low (like `3600` seconds) and flush the cache.
139
-
</details>
140
133
141
-
<details>
142
-
<summary><code>Flushing the cache causes timeout</code></summary>
134
+
## <code>Flushing the cache causes timeout</code>
143
135
144
136
This can happen when the dataset in Redis Server is quite large. Consider increasing `WP_REDIS_READ_TIMEOUT` and `WP_REDIS_FLUSH_TIMEOUT` to 5-10 seconds.
145
137
146
138
Alternatively, starting with Redis 6.2, setting the `lazyfree-lazy-user-flush` in the `redis.conf` configuration directive to `yes` changes the default flush mode to be asynchronous.
147
-
</details>
148
139
149
-
<details>
150
-
<summary>Unable to flush the cache</summary>
140
+
## Unable to flush the cache
151
141
152
142
If your site is unreachable, you can flush the cache without access to the WordPress dashboard.
Alternatively, you can use a desktop client like [Medis](https://getmedis.com) or [RedisInsight](https://redis.com/redis-enterprise/redis-insight/) to connect to your Redis Server and flush it by executing `FLUSHALL`.
161
-
</details>
162
151
163
-
<details>
164
-
<summary>Cache is flushed constantly</summary>
152
+
## Cache is flushed constantly
165
153
166
154
If you don't see metrics building up, or your site is not getting faster, you might have an active plugin that flushes the object cache frequently. To diagnose this issue you can use the following snippet to find the source of the cache flush:
Once you found the plugin responsible by checking `redis-cache-flush.log`, you can contact the plugin author(s) and reporting the issue.
179
-
</details>
180
167
181
-
<details>
182
-
<summary>Flushing the cache regularly</summary>
168
+
## Flushing the cache regularly
183
169
184
170
It's considered a bad practise to flush the frequently, but sometimes 3rd party plugins and themes just don't play nice with persistent object caches. When the plugin/theme authors refuse to fix their code you can use [WP Cron](https://developer.wordpress.org/plugins/cron/) to flush the Redis object cache frequently.
Before [uninstalling the plugin](https://wordpress.org/documentation/article/manage-plugins/#uninstalling-plugins-1), be sure to disable the cache via `WordPress -> Settings -> Redis`.
199
183
200
184
If you already removed the plugin before doing so, you can delete the `object-cache.php` file in your `/wp-content/` directly.
0 commit comments