Skip to content

Commit

Permalink
Apply feedback - fix WP script
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelwhitton committed Feb 4, 2025
1 parent f944864 commit 3556444
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 24 deletions.
10 changes: 2 additions & 8 deletions source/content/addons/object-cache/howto/wordpress.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,8 @@ read SITE;
echo 'Provide the site name (multidev, dev, test, or live), then press [ENTER]:';
read ENV;
# Get a list of all cache tables
CACHETABLES="$(terminus wp $SITE.$ENV -- db query "SHOW TABLES LIKE 'cache%';")"
# Trucate each cache table in a loop to avoid resource contention and potential deadlocks.
for table in $CACHETABLES; do
terminus wp $SITE.$ENV -- db query "TRUNCATE TABLE $table;"
done
# Delete all transient options - these are now stored in Redis
terminus wp $SITE.$ENV -- db query "DELETE FROM wp_options WHERE option_name LIKE ('%\_transient\_%');"
```

## Installation and Configuration for Composer-Managed WordPress Sites
Expand Down
16 changes: 0 additions & 16 deletions source/scripts/drupal-db-cleanup-cache-tables.sh

This file was deleted.

10 changes: 10 additions & 0 deletions source/scripts/drupal-db-cleanup-cache-tables.sh.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

echo 'Provide the site name (e.g. your-awesome-site), then press [ENTER]:';
read SITE;

echo 'Provide the site name (multidev, dev, test, or live), then press [ENTER]:';
read ENV;

# Delete all transient options - these are now stored in Redis
terminus wp $SITE.$ENV -- db query "DELETE FROM wp_options WHERE option_name LIKE ('%\_transient\_%');"

0 comments on commit 3556444

Please sign in to comment.