WordPress

How To Update WordPress Site Url After Changing to A New Domain

If you have moved your WordPress site to a new domain, updating the internal links and the image reference in the posts and pages seems inevitable so they can all be pointed to the new place. So, since updating them individually is impossible, how to update them in bulk and what’s the easiest way of doing it?

Update link against the database

Deep down, all post information are stored in the database table. So if you have access to the database that powers your site, you can run an Update query like below to quickly update the links and image references to the new domain.

UPDATE wp_posts SET post_content = REPLACE(post_content, 'old domain', 'new domain')

You can do the same against the Comments table so all comments can also be updated.

Update with a plugin

For those who don’t have access to the MySQL database or just don’t feel comfortable playing with the database tables directly, there is a pretty cool plugin called Velvet Blues Update URLs that you can use to achieve the same goal.

After having it installed and activated, go to Tools → Update URLs to start the process.

As you can see from the screenshot above, you have the options to update the URLs in the posts, pages, excerpts, links, attachments, etc..

It seems that using the plugin like Velvet Blue Update URLs does the job more thoroughly than running the query against the database directly.

So, that being said, if you want a thorough and easier solution to update URLs for a WordPress site, using the plugin is recommended.

edge

View Comments

Share
Published by
edge

Recent Posts

Disable Copilot on Windows 11 via Group Policy GPO

If using Copilot right from the Taskbar isn't your thing, you should disable it. Even…

8 months ago

Setting Default Fonts in Word, Excel, Outlook, and PowerPoint via Group Policy

In an environment where standardizing things does matter, setting default fonts in Microsoft Office apps…

9 months ago

Wake-On-LAN (WOL) with Windows and PowerShell

Wake-On-LAN is a networking standard that lets you wake up a computer from either a…

9 months ago

How To Remove Restrictions Set in A Password-Protected PDF File

First of all, this is not to bypass a PDF file that requires a password…

10 months ago

How To Move My Outlook Navigation Bar Back From Left Back To the Bottom

Microsoft has been lurking about the idea of placing the Outlook navigation bar to the…

2 years ago

Headset with Microphone Echoing My Own Voice on Windows, What To Do?

One colleague came up to me the other day asking me to take look at…

2 years ago