In this example, we have shared how to download and insert salt string inside wordpress wp-config.php with Bash. Use the following code.
1 2 3 4 5 | #!/bin/sh SALT=$(curl -L https://api.wordpress.org/secret-key/1.1/salt/) STRING='put your unique phrase here' printf '%s\n' "g/$STRING/d" a "$SALT" . w | ed -s wp-config.php |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.