If you’ve recently changed domain names, or made a copy of the site (for testing, development, or any other purpose) then you need to update the domain setting in WordPress. If you don’t, then all links will point back to the old/original domain name and take you away from the new site. You may also (very likely) run into issues trying to sign in to the admin pages of the new site because of domain name mismatching from what WordPress expects.
The *best* way to change the site’s domain name setting is through the WordPress admin pages. If for some reason you can’t do that, then you can also directly edit the MySQL database. Look at the wp_options table and specifically the record(s) for option_name=’siteurl‘ or option_name=’home‘.
If you can’t access the database you can also manually override the domain setting. To do this locate the wp-config.php file which should be in the root of your WordPress site. Open the file in your favorite text editor and add the two lines below:
Obviously you should replace “YourDomain.com” with the actual domain name of the WordPress site.
You may have to use the script via a database though as some database elements will have the url hardcoded – i.e when you upload images to the system or extra plugins.
Hello Brad Kingsley,
Thanks, on a related note, My pal has this new domain he acquired from godaddy and he wants to move it to wordpress so he can have this site on wordpress. How a great deal would it price my good friend to hire somebody to do it for him ? Remember to help.
I look forward to your next post