If you ever need to move your WordPress website to a new domain name, there’s more to the process than meets the eye. To change site URLs in WordPress, you need to update the database. All of your post and page URLs are stored in the database, so if you just switch out the domain name for your site, the database will still try to link to the old domain.
There are a lot of database tables that have to be updated, and while you could go through the database for WordPress and update URLs manually, row by row, it’s not really a feasible approach. You would likely miss something (or a lot of somethings). And if you have a larger site, it would simply take too much time to make the changes manually.
But the entire database updating process can be done in minutes with a plugin called Go Live Update Urls, a great tool to update URLs in WordPress.
First Things First
The process will go more smoothly if you can make a copy of your existing site on the new domain. That will give you the option of switching things back if you have to (you would do the reverse of what we’re about to do).
So to that end, I’ve copied all of my WordPress files from the old domain, ggexample.com, to a separate site on the new domain, ggexample.net.
Tip: If you’ve got a large WordPress site, you may want to use something like the All-in-One WP Migration Plugin to make the transfer job easier.
As you can see, the site comes up on the new domain, ggexample.net. That’s because I copied the wp-config.php file, so the new site location is still connecting to the original database.
The problem is, the database still thinks the site lives on ggexample.com, as you can see when I mouse over a link.
We’re going to remedy that problem with Go Live Update Urls.
Installing Go Live Update URLs
Install the plugin on the original WordPress installation on the old domain. We do that because we can’t access the WordPress admin panel on the new domain yet.
Log in to your WordPress admin panel.
In the left column navigation, mouse over the “Plugins” link and click the “Add New” link.
In the “Search plugins…” box, enter “Go Live Update Urls.”
Once you have located the plugin, click the “Install Now” button.
When the plugin has been installed, click the “Activate” button.
How to Change the WordPress Address URL
In the left column navigation, mouse over the “Tools” link and click the “Go Live” link.
You’ll see a warning, “Like any other database updating tool, you should always perform a backup before running.” Those kinds of backup warnings are common when working in WordPress, but in this case, it is important to back up the database before continuing.
That way, if there are any missteps, you can dump in your backup and be back to where you started.
I’ve used Go Live Update Urls to change site URLs in WordPress a few times now, and it has never failed to work correctly. But you should make that backup anyway.
Better safe than sorry, as they say.
There’s not much to the configuration in the free version of the plugin. All of the “WordPress Core Tables” should be pre-selected.
All you have to do is enter the old and new URLs.
You can see I have the full URL for the original site, http://ggexample.com in the “Old URL” field, and the new URL, http://ggexample.net in the “New URL” field. No need to use a trailing slash.
Click the “Update URLs” button.
Now when I go to the site on ggexample.net, you can see that the URLs in the database have changed to point to the new domain name.
Some Things to Watch Out For
While all of your posts, pages, image URLs, excerpts, post metadata, custom post types, widgets and widget data, and site settings will work, the free version of the plugin doesn’t update database tables created by plugins or update serialized data.
So you may have to uninstall and reinstall some plugins. Test your plugin functions to see if they’re affected by the Go Live Update Urls limitation.
The need to change site URLs in WordPress may not come up often, but when it does, it’s good to have tools at your disposal to make the job easier.
Have you ever moved your WordPress site to a new domain name? Have you used any other kind of find/replace tools to do the same job? Let me know in the comments.
Author: Michael Phillips
Michael Phillips is a web hosting industry veteran, helping people make the most of their web presence since 1995.