MediaServe Regarding --bulk-install-ls-plugin, I'd love to use this to install LiteSpeed Cache, but I'm sure we have some caching plugins installed (including paid versions) that members will balk at having removed. Then specific object cache plugins such as Redis Object Cache will need removed as well. I'm trying to think of all the problems we'll encounter with this.
Would be nice if we could somehow target only WP installs without any caching plugins to start with.
I would also like to install https://wordpress.org/plugins/heartbeat-control/ and tune it, so I'll have to figure out how to do that with wp-cli.
For us, we always remove any other cache plugins during client migrations, but I understand this approach might not work for all companies. Targeting only sites without existing cache plugins is tricky since there are countless cache plugins, each working differently. We may improve the helper tool to better handle this in the future. In the meantime, you can try this :
# Step 1: Find all matching paths and save them to '/tmp/sites_likely_with_cache.txt'
awk -F, '{print $1 "/.htaccess"}' /var/log/cpfenceav/wp-sites-list.txt | \
xargs grep -l -E 'WP Rocket|W3TC|LITESPEED|WP Super Cache|Cache Enabler|Comet Cache|Breeze|Hummingbird Cache|Swift Performance|Autoptimize|Hyper Cache|WP Fastest Cache|Powered Cache|Cachify|Simple Cache|Advanced Cache' | \
sed 's|/.htaccess||' > /tmp/sites_likely_with_cache.txt
# Step 2: Remove matching paths from the original list and save as '/tmp/sites_without_cache.txt'
grep -vFf /tmp/sites_likely_with_cache.txt /var/log/cpfenceav/wp-sites-list.txt > /tmp/sites_without_cache.txt
This identifies sites likely using cache plugins and creates separate lists. Once you’re happy with the results, replace /var/log/cpfenceav/wp-sites-list.txt
with /tmp/sites_without_cache.txt
before running the bulk tool. Don't worry about the list, it will be generated again automatically during the next WP-AutoShield run at 6:10 AM.
For Heartbeat Control or other plugins, you can bulk install them using:
cpfence --bulk-install-wp-plugin heartbeat-control
We’re also working on a helper tool to bulk configure heartbeat settings in LiteSpeed Cache >> Toolbox >> Heartbeat Control. It’s already in beta, but we’re fine-tuning it to work seamlessly for most companies. If you have preferred settings, please share them , they’ll help us release the tool faster.
Hope this helps!