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
1. Ensure that your site is on a paid Performance or Elite plan. This can be verified by navigating to your **Pantheon Site Dashboard**, selecting **Settings**, selecting **About Site**, and then looking at the **Service Level**.
52
56
@@ -102,27 +106,9 @@ terminus redis:enable <site>
102
106
103
107
</Alert>
104
108
105
-
### Database Cleanup (Required)
106
-
By default, when Redis is not available on a WordPress site, WordPress stores [transient data](https://developer.wordpress.org/apis/transients/) in the database. Transients are bits of data that are intended to be stored _temporarily_ and then cleared automatically. When object caching like Redis is available, WordPress automatically stores transients into the object cache. However, after enabling Redis, any transients that previously existed in the database will not necessarily be cleared automatically, even when the cache is cleared. For sites that were live forawhile before Redis was enabled, there could be significant amounts of datain these tables. Removing this data could increase the speed of cloning, exporting, and backing up the database.
107
-
108
-
Use the following script to cleanup cache tables in the database:
109
-
110
-
<Download file="wp-db-cleanup-cache-tables.sh" />
111
-
112
-
```bash
113
-
#!/bin/bash
114
-
115
-
echo'Provide the site name (e.g. your-awesome-site), then press [ENTER]:';
116
-
read SITE;
117
-
118
-
echo'Provide the environment name (multidev, dev, test, or live), then press [ENTER]:';
119
-
read ENV;
120
-
121
-
# Delete all transient options - these are now stored in Redis
122
-
terminus wp $SITE.$ENV -- db query "DELETE FROM wp_options WHERE option_name LIKE ('%\_transient\_%');"
123
-
```
109
+
</Tab>
124
110
125
-
## Installation and Configuration for Composer-Managed WordPress Sites
Refer to the [official Object Cache Pro documentation](https://objectcache.pro/docs/composer-installation) for full configuration instructions.
128
114
@@ -132,6 +118,7 @@ Refer to the [official Object Cache Pro documentation](https://objectcache.pro/d
132
118
1. Open your `pantheon.yml` file and modify the `object_cache` entry or add an `object_cache` entry if there is not one already such that your `pantheon.yml` file includes:
133
119
134
120
```yaml
121
+
api_version: 1
135
122
object_cache:
136
123
version: 6.2
137
124
```
@@ -145,16 +132,16 @@ Refer to the [official Object Cache Pro documentation](https://objectcache.pro/d
145
132
146
133
This will pull the Object Cache Pro license token directly into the `auth.json` file. You can open the `auth.json` file locally to ensure that it has a structure that looks like this:
147
134
148
-
```json
149
-
{
150
-
"http-basic": {
151
-
"objectcache.pro": {
152
-
"username": "token",
153
-
"password": "<LICENSE-TOKEN>"
154
-
}
135
+
```json
136
+
{
137
+
"http-basic": {
138
+
"objectcache.pro": {
139
+
"username": "token",
140
+
"password": "<LICENSE-TOKEN>"
155
141
}
156
142
}
157
-
```
143
+
}
144
+
```
158
145
159
146
<Alert title="Note" type="info">
160
147
@@ -312,6 +299,30 @@ Refer to the [official Object Cache Pro documentation](https://objectcache.pro/d
312
299
313
300
1. See the ["Database Cleanup" section above](#database-cleanup-required) for steps on how to truncate the existing cache tables to make sure the latest data populates object cache properly.
314
301
302
+
</Tab>
303
+
304
+
</TabList>
305
+
306
+
### Database Cleanup (Required)
307
+
By default, when Redis is not available on a WordPress site, WordPress stores [transient data](https://developer.wordpress.org/apis/transients/) in the database. Transients are bits of data that are intended to be stored _temporarily_ and then cleared automatically. When object caching like Redis is available, WordPress automatically stores transients into the object cache. However, after enabling Redis, any transients that previously existed in the database will not necessarily be cleared automatically, even when the cache is cleared. For sites that were live for awhile before Redis was enabled, there could be significant amounts of data in these tables. Removing this data could increase the speed of cloning, exporting, and backing up the database.
308
+
309
+
Use the following script to cleanup cache tables in the database:
310
+
311
+
<Download file="wp-db-cleanup-cache-tables.sh" />
312
+
313
+
```bash
314
+
#!/bin/bash
315
+
316
+
echo 'Provide the site name (e.g. your-awesome-site), then press [ENTER]:';
317
+
read SITE;
318
+
319
+
echo 'Provide the environment name (multidev, dev, test, or live), then press [ENTER]:';
320
+
read ENV;
321
+
322
+
# Delete all transient options - these are now stored in Redis
323
+
terminus wp $SITE.$ENV -- db query "DELETE FROM wp_options WHERE option_name LIKE ('%\_transient\_%');"
324
+
```
325
+
315
326
## Local configuration with Lando
316
327
Lando's [Pantheon recipe](https://docs.lando.dev/plugins/pantheon/) includes Redis in its Docker configuration. However, to get Object Cache Pro to work correctly with Lando locally, you'll need to make a few changes to your Object Cache Pro and Lando configuration.
0 commit comments