Created
January 25, 2024 09:03
-
-
Save darkdiesel/d352e7e20cda4941d2e246e420cc2e17 to your computer and use it in GitHub Desktop.
WP replace host in db
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run this from console to update db | |
php srdb.cli.php -h "127.0.0.1" -n "dbname" -u dbuser -p "dbuserpass" -P 3310 -s "https://host.old" -r "https://host.new" --debug true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update wp config with constans that will contain your new host | |
define( 'WP_HOME', 'https://host.new' ); | |
define( 'WP_SITEURL', 'https://host.new' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment