9 lines
408 B
Bash
9 lines
408 B
Bash
#!/bin/bash
|
|
|
|
export WP_FILE="/usr/share/nginx/subdomain/www/wp-config.php"
|
|
sed -i '/^define.*NONCE_SALT.*/a define(\'\'WP_SITEURL\'', '\'http://localhost/\'');' $WP_FILE || exit
|
|
sed -i '/^define.*NONCE_SALT.*/a define(\'\'WP_HOME\'', '\'http://localhost/\'');' $WP_FILE || exit
|
|
wget --spider localhost && wget --spider localhost/wp-login.php || exit
|
|
sed -i '/http\:\/\/localhost/d' $WP_FILE || exit
|
|
|