Adds RECOVERY_MODE_EMAIL to wp-config.php file.
[email protected]
wp config set RECOVERY_MODE_EMAIL $email --type=constant
# Check if added. If not then attempt to add at different location.
if ! $( wp config has RECOVERY_MODE_EMAIL ); then
wp config set RECOVERY_MODE_EMAIL $email --type=constant --anchor="# That's It. Pencils down"
fi
if ! $( wp config has RECOVERY_MODE_EMAIL ); then
COLOR_RED="\033[31m"
COLOR_NORMAL="\033[39m"
echo -e "${COLOR_RED}Error:${COLOR_NORMAL} Unable to add RECOVERY_MODE_EMAIL to wp-config.php"
fi
Replace [email protected] with email address you wish to use for recovery mode.
Run it across a fleet
Open the console in CaptainCore Manager, pick the target sites, choose this recipe from the Cookbook picker and press run. The CLI streams each site's output back to the dock.
About the console →