How can I insert the content of the variable $SALT in a specific point (line or string) of a file like wp-contet.php from wordpress using Bash script?
I built a simple CLI for just that. Try it out. It's called [WP-Salts-Update-CLI][1]
.
WPSUCLI
downloads new salts from the WP API and replaces them with the ones in your wp-config.php file for every site on your server.
Open command line terminal (I prefer iTerm2) and run the following command.
bash
sudo wget -qO wpsucli https://git.io/vykgu && sudo chmod +x ./wpsucli && sudo install ./wpsucli /usr/local/bin/wpsucli
This command will perform the following actions:
WPSUCLI
and rename it to wpsucli
wpsucli
executablewpsucli
inside /usr/local/bin/ folder.