Last active
December 21, 2024 02:39
-
-
Save mjones129/f16ee274a276a5bc21a11fd3cc321ca9 to your computer and use it in GitHub Desktop.
Set Wordpress URL with WPCLI
This file contains hidden or 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
#show siteurl | |
wp db query "SELECT * FROM wp_options WHERE option_name = 'siteurl';" | |
#show home | |
wp db query "SELECT * FROM wp_options WHERE option_name = 'home';" | |
#update siteurl | |
wp db query "UPDATE wp_options SET option_value = 'https://newsiteurl.com' WHERE option_name = 'siteurl';" | |
#update home | |
wp db query "UPDATE wp_options SET option_value = 'https://newsiteurl.com' WHERE option_name = 'home';" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment