Moderator
t-p
(@t-p)
If you know how to access phpMyAdmin on your host, then check the wp_options Table (Note: The table prefix of wp_ may be different if you changed it when installing), and make sure siteurl field and home field are correct. See https://codex.wordpress.org/Changing_The_Site_URL#Changing_the_URL_directly_in_the_database
Even easier, put the 2 loines below in your wp-config file and make sure to use your url
define(‘WP_HOME’, ‘http://www.example.com’); // blog url
define(‘WP_SITEURL’, ‘http://www.example.com’); // site url
Even easier, put the 2 loines below in your wp-config file and make sure to use your url
A word of caution: That option will prevent you from being able to change the URL’s from the dashboard again.
True, but unless you are changing domains, how often do you need to change the url? The bonus is that you can really cause issues if you mess up in the database, this is easily reversed.
As Tara pointed out, the linked document above contains instructions for several methods of changing the URL’s.
True, but unless you are changing domains, how often do you need to change the url?
Agreed, but a hard-coded solution may not be the weapon of choice.
“This is not necessarily the best fix, it’s just hardcoding the values into the site itself. You won’t be able to edit them on the General settings page anymore when using this method”
There is another file editing method that may even be a better choice, if editing the database isn’t within ones immediate comfort level.
Edit functions.php
“Important! Do not leave those lines in the functions.php file. Remove them after the site is up and running again.”