We have multiple wordpress sites and need to update the wp-config for w3 total cache. We have to append define('WP_CACHE', true);
into the wp-config.php file. Is it possible to do this via ssh. I don’t want to have to go in and open each config file and add it myself.
Your help will be much appreciated.
This commands prepends a line at the beggining of yourfile
To look for many files named wp-config.php and prepend the same text, type this in the shell:
Run this from the main folder where you have all the WP sites.
This will search the server recursively from root (
/
) for all files namedwp-config.php
and append the stringdefine('WP_CACHE', true);
onto the end of the file.