Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Easily Update URLs When Moving Your WordPress Site

Moving your WordPress website to a new domain or server is a big step, and one of the biggest jobs is updating all those old URLs scattered throughout your content.

Manually editing each post and page can feel like an endless chore, so we prefer to use WordPress plugins with powerful automation tools to save hours of frustration.

This article shows you how to update your WordPress URLs after a site move, ensuring a smooth transition and preventing broken links that could harm SEO and user experience.

How to Update URLs when Moving your WordPress Site

Here is a list of topics we will cover in this guide:

When Do You Need to Update URLs on Your WordPress Site?

Let’s suppose you moved a WordPress site to a new domain name. You can then change the WordPress address and site address by visiting the Settings » General page from your WordPress dashboard.

Changing WordPress and site URLs

However, this doesn’t change the URLs that you have previously added to your posts and pages. It also doesn’t change the URLs of images you have added to your WordPress site.

Changing all of these URLs manually in every blog post and page can be time-consuming. Plus, there is always a chance that you will miss some URLs, which can lead to broken links on your website.

That’s why it is important to update your URLs when moving your WordPress website.

It helps in providing a smooth user experience for your users, as they will easily find the page they’re looking for. Updating URLs also improves your WordPress SEO and allows search engines to find new content for indexing.

Last but not least, you also want to ensure there are proper 301 redirects set up from your old domain to the new domain so users are always redirected to the right place.

This is extremely important because there are likely other websites that are linking to your old domain, including social media posts, Google, and more.

With that said, let’s see how you can quickly and easily update URLs when migrating your WordPress site.

Update URLs After Moving a WordPress Site

The easiest way to update old links on your website is by using the Search & Replace Everything plugin for WordPress. It is a free WordPress plugin that lets you update URLs in your posts, pages, images, excerpts, widgets, and more.

However, make sure that you have a complete backup of your WordPress site before updating all the links. This will allow you to easily revert back in case something goes wrong during the update process.

Next, you will need to install and activate Search & Replace Everything on your site. For more details, see our step-by-step guide on how to install a WordPress plugin.

Note: There’s also a premium version of Search & Replace Everything that comes with more advanced features.

Upon activation, you should navigate to Tools » WP Search & Replace from your WordPress admin panel.

First, you will see a section for updating the old links to the new site URLs. Go ahead and enter the old URL in the ‘Search for’ field and the new URL in the ‘Replace with’ field.

Enter old and new URL in Search & Replace Everything

Then, you can scroll down to select specific tables in the WordPress database that you want to update. You can update URLs in your posts, comments, options, user data, and other areas of your site by checking the WordPress core tables options in the plugin.

WordPress core tables are where all your website data is organized and stored. For example, a wp_comments table will have all the information about comments on your site, along with data about the person commenting.

You can also click the ‘Select All’ option to choose all of the tables.

Next, click the ‘Preview Search & Replace’ button to continue.

Select all tables in Search & Replace Everything

The plugin will then allow you to preview the changes it will make. That way, you don’t have to worry about making any mistakes.

Lastly, click the ‘Replace All’ button.

Preview changes and click Replace All

The plugin will now update all the URLs on your site to the new domain.

Redirect Posts & Pages After Updating URLs

After you have updated all the URLs on your website, you will now need to set up 301 redirects for your entire site to the new domain. This will preserve links from sites that were linking to your old domain and prevent 404 errors.

The easiest way of performing a full site redirect is by using the All in One SEO (AIOSEO) plugin. It is the best SEO WordPress plugin and is trusted by over 3 million professionals.

AIOSEO offers a powerful redirection manager that lets you redirect old website URLs to new ones in just a few clicks. The plugin also helps track 404 errors on your site so you can quickly find and fix any broken links.

For this tutorial, we will be using the AIOSEO Pro version because it includes the redirection manager and other features like sitemaps, custom breadcrumbs, and schema markup. You can also try the free version of AIOSEO to get started.

The first thing you’ll need to do is install and activate the AIOSEO plugin on your site. If you need help, then please refer to our guide on how to install a WordPress plugin.

Upon activation, you will need to go to All in One SEO » Dashboard from your WordPress admin panel. Now click the ‘Launch the Setup Wizard’ button to configure the plugin.

AIOSEO dashboard launch setup wizard

All you have to do is follow the steps in the setup wizard. For more information, see our detailed tutorial on how to set up All in One SEO for WordPress.

1. Setting Up Full Site Redirects

This method is super useful when you are merging two separate WordPress sites into one or if you are going to set up a new WordPress install for the new domain because it will handle a full site redirect without adding any code.

Simply head over to All in One SEO » Redirects from your WordPress admin area and click the ‘Activate Redirects’ button.

Activate AIOSEO redirects

Upon activation, you will need to navigate to the ‘Full Site Redirect’ tab and enable the ‘Relocate Site’ toggle.

Next, you can enter your new domain name in the ‘Relocate to domain’ option.

Full site redirect

After entering your new domain URL, don’t forget to click the ‘Save Changes’ button to store your settings. AIOSEO will now redirect all the links on your site to the new URL.

2. Setting Up Individual Post / Page Redirects

AIOSEO also offers different types of redirection methods that you can use to set up individual post and page redirects.

We recommend selecting the ‘301 Moved Permanently’ redirection type. This tells your browser that the page has been moved to a new destination permanently, and you don’t wish to move it back.

Add redirection for old links

Once you have filled out these details, simply click the ‘Add Redirect’ button.

You can see the different redirects you have created by scrolling down and viewing the logs.

Redirection logs in AIOSEO

You can see the URLs, the number of people that visited the link, the type of redirection you have set, and also choose whether to enable or disable the redirect.

In the ‘Settings’ tab under Redirects, you can choose to set up server-level redirects as well, which are way faster. The default method is set to PHP, which is the easiest way to redirect old URLs, and it doesn’t require any server-side configuration.

But you can select ‘Web Server’ as the redirection method and then choose either Apache or NGINX as your web server. We won’t recommend this method for beginners as it requires technical knowledge.

Select the Redirect Method

When you update your URLs to a new domain, it is also essential to keep an eye on any broken links. These are links that no longer exist and show a 404 error page. They can occur if any URL doesn’t get updated properly.

With AIOSEO, it is very easy to track and fix 404 error pages using the Redirection Manager.

To begin, you can head over to All in One SEO » Redirects from your WordPress dashboard.

Next, go ahead and click the ‘Settings’ tab under Redirects and then click on the toggle to enable the ‘404 Logs’ and ‘Redirect Logs’ options.

Enable 404 logs

Using AIOSEO, you can choose the time period to keep your 404 error logs. We recommend that you select no longer than one month for smooth and optimal WordPress performance.

Once you have enabled these options, click the ‘Save Changes’ button at the top of the page to store your settings.

You should now see a new ‘404 Logs’ tab appear under Redirects in AIOSEO. Under this tab, the plugin will track and show 404 error pages on your website.

An important thing to note is that you won’t see any data under the 404 Logs tab at first. The plugin will only start to record broken links after you have enabled the settings.

However, once the setting has been active for some time, go ahead and click on the ‘404 Logs’ tab. You’ll see a list of broken links under the URL column, the number of visits under the Hits column, and the last accessed date.

Click 404 logs menu option

To fix any broken link, simply click the ‘Add Redirect’ button for the respective URL. AIOSEO will now show options to set up redirection for the 404 error URL.

You will need to enter the new link under the ‘Target URL’ field and select ‘301 Moved Permanently’ as the Redirection Type from the dropdown menu.

Add redirect for your broken link

Next, go ahead and click the ‘Add Redirect’ button to fix the broken link on your website.

To check if the redirection is working, simply visit the old URL. If you are redirected to the new URL, then it means you have successfully fixed 404 error pages.

Our Best Guides on Moving Your WordPress Site

We hope this article helped you learn how to update URLs when moving your WordPress site. You may also want to see some of our other guides on how to move your website:

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

132 CommentsLeave a Reply

  1. Olaf

    When I migrated websites to a different domain, I always did it the old-fashioned way. I exported the database to an SQL file, opened it using the PS Pad editor, and used the replace function to adjust all URLs. I then imported the modified export back into the database, and that was it. This is a simpler solution based on the same principle, but without the need to export and import. I like this approach better.

  2. Jiří Vaněk

    The Search & Replace plugin and this article saved my website. Due to the PolyLang plugin, I had to modify the URLs of over 1,000 articles to add /cz and /en at the end of the URLs for separate language versions of the articles. Thanks to this plugin, I was able to adjust the URLs in just ten minutes, and the problem was solved. This article and this plugin literally saved me hours of work.

  3. kzain

    The thought of updating all those URLs seemed daunting, but the post makes it clear with both plugin and manual options. I appreciate the reminder about backing up the website before making any changes.

  4. Dennis Muthomi

    I’m curious about the SEO implications of redirecting from an old domain to a new one. Does the new domain inherit the SEO authority from the old one?

    • WPBeginner Support

      Creating a 301 redirect would help maintain the SEO authority from your original domain.

      Admin

  5. mohadese esmaeeli

    I know that if, for any reason, I decide to change my site’s domain, I need to consider some crucial points to preserve its SEO. How long does it take for our links to return to their previous positions in Google search results?

    • WPBeginner Support

      There is no guaranteed timeframe for your page rankings, following the steps from this guide will help with minimizing the time the rankings may have trouble.

      Admin

    • Jiří Vaněk

      It’s different for every website, but in my case, it took just a few months when I changed the entire domain name to another one. You’ll help yourself a lot if you use Google Search Console and assist the process with XML sitemaps and the built-in tools in the console. This helped me get everything back on track within about 2-3 months. It’s also a good idea to have a 301 redirect on the old domain. That should make the transition easier.

  6. Eric B

    WOW!! This was incredibly easy and fast. I am blown away on how seamless this was. Thank you for sharing!

    • WPBeginner Support

      You’re welcome, glad you liked our guide :)

      Admin

  7. Imad Oulahou

    really helpful article especially the Velvet Blues Update URLs plugin
    thanks in advance

    • WPBeginner Support

      You’re welcome, glad our guide and recommendation was helpful :)

      Admin

  8. ramksihun

    thank you so much …
    this post really save a lot of time..

    • WPBeginner Support

      You’re welcome, glad you liked our guide :)

      Admin

  9. Siya

    Amazing. Just amazing. Thank you!

    • WPBeginner Support

      You’re welcome :)

      Admin

  10. M Waseem

    You guys are awesome, Just saved my time of manually updating them,
    Thanks Guys!

    • WPBeginner Support

      You’re welcome, glad our guide was helpful :)

      Admin

  11. Hossein

    thank you very much,

    My problem was solved.

    • WPBeginner Support

      Glad our article could be helpful :)

      Admin

  12. Jack

    Really good help !

    • WPBeginner Support

      Glad our guide could be helpful :)

      Admin

  13. Ghulam Abbas

    Thanks it saves my a lot of work.

    • WPBeginner Support

      You’re welcome, glad our recommendation could help :)

      Admin

  14. Ben Jamir

    I installed activated, unfortunately, it failed to change the images URL. After switching my site to https, i had to change my site address to a non-www
    Example : from http:www.example.com to https:example.com

    SSL is properly activated, my site is up but most of the images still points to the www version of my site.

    The plugin report was zero changes done for all attachment files.

    Any idea or advice will be helpful

    Thank you

    • WPBeginner Support

      You would want to ensure the options were checked below the url and that the url you entered was correct as well for the most common reasons

      Admin

  15. Ben Jamir

    I am impressed with all the positive comments. I am planning to install and try this plugin for changing my image URLs.
    One thing I want to know is that if the plugin succeeds and does what it’s supposed to do, do we need to keep the plugin installed and activated?
    Once the job is done can we deactivate the plugin?
    Will deactivating the plugin reverts the changes it made ???

    Thank you

    • WPBeginner Support

      You can delete Velvet Blues after it has updated your URLs without them being reverted

      Admin

  16. Caroline

    I tried Velvet Blues Update URLs, but it doesn’t work in custom fields. Is there any other way to update custom fields?

    • WPBeginner Support

      Did you check the option for it to update custom fields? You may want to reach out to the plugin’s support if that option isn’t having it update your fields

      Admin

  17. Abdessamad

    Thanx for this article it was very helpful, I have a question though, Is there a way to automatically remove the old urls from my database ?

    • WPBeginner Support

      It would depend on what you mean, this method should handle links in posts and pages but in general, if you have your old url in plugins we do not have a recommended method at the moment.

      Admin

  18. Jake

    Can the Velvet Blue plugin be used for a sub-folder change as well?

  19. Linda

    Thanks for telling us about this plugin. Haven’t tried it yet, but will soon. I was working away on the subdomain we’re using to create our new site, and adding links when I suddenly thought, “Bet these links don’t get updated automatically. Do I need to record every one I’ve created so I can update it later?”

    So glad to know there’s a plugin that will do most of this for us.j

    Thank you,

    Linda

    • WPBeginner Support

      Glad our guide could point out the plugin for you :)

      Admin

  20. Hadi

    Many thanks

    But I have changed all URLs in footer by my self.

    • WPBeginner Support

      Well done, you can certainly update your links manually, the plugin is an option for those who don’t want to manually go through all of their content on their site to update the links :)

      Admin

  21. Pratyush kashyap

    Worked for me, thanks bro

    • WPBeginner Support

      You’re welcome, glad our guide could help :)

      Admin

  22. Dionne

    Hi there,

    I managed to update all textlinks using broken link checker. But buttons (wp bakery) are not affected. Will this plugin update the link in buttons too?

    • WPBeginner Support

      You would want to check with WPBakery to see if it currently allows this type of editing

      Admin

  23. Nidhi

    Hey will it change all my Quicklinks in each page go my footer. I have different Quicklinks and buttons to the specific pages and all the links needs to be changed. SO will it work ???

    Also my wordpress website is under wordpress folder so the link also mention the wordpress folder on the website If I will change the folder name and then put a link in
    old saying “www.example.test/wordpress” and
    new saying “www.newsite.com/renamefoldername”

    SO will this work or do I manually have to change the link for each pages

    • WPBeginner Support

      Depending on how the quick links were created it likely will not update those but it will be able to update the folder.

      Admin

  24. Keven

    This article is a blessing !!

    • WPBeginner Support

      Thank you :)

      Admin

  25. Naga Kishore

    The same issue happened on one of my client website after migration.

    when i am trying to add a new image in the slider it is not with updating the new urls & showing 404 errors.

    After using the plugin Velvet Blues Update URLs the issue is resolved. Thanks for sharing the article.

    • WPBeginner Support

      Glad our article could help :)

      Admin

  26. Rob

    Hey I’m having an issue,
    Whats happened is I initially changed my site URL. Now whats happened is that whenever someone clicks on my blog name (when they see my comments on another post) they get a broken link to the old URL. If anyone knows how to fix this that would be great.

    • WPBeginner Support

      You may want to try resaving your new url and resaving your permalinks in case that was cached somewhere

      Admin

  27. Jp

    Hi,

    Velvet blues worked great for regular images in posts but not featured images. Do you know about a plugin that supports changing featured images URLs? I’m storing images in a different server in the new version of my site.

    • WPBeginner Support

      It should also update featured images, you may want to reach out to the plugin’s support if it is not updating properly.

      Admin

  28. John Doe

    Does not work for me. However, I may be trying to do something this plugin does not support – moving from non-www to www subdomain.

    • WPBeginner Support

      Hey John,

      It does support that, if your URLs have www, then you can use the plugin to replace them with non-www URLs.

      Admin

  29. Asrar

    Hi Everyone
    i want to upload my local wordpress site to online, but when i download all the files and want to change the links (localhost/websitename/ ) there is no such links available except two links. As there must be many lins to be changes bu i dont see . Why the links are missing ?
    anyone knows ?

  30. Yogi

    The Velvet Blues Update URLs plugin is excellent. I want to share my experience with it. After i did my URL change with it. I still see the error on opening all post. I solved it by going to “Settings > Permalinks” section and then saved my permalinks once more by clicking the “Save Changes” button. This solved my problem and will also solve yours if you still get some error.

    • Nice Kid

      Thanks Yogi !!

  31. Sirisha allamneni

    Thank you very much. this solved my problem

  32. Jhavinder

    I am using the same domain but i have changed my hosting. After that my all images in post are not showing. How can i fix this problem.

  33. BEN10

    WIll it still maintain it after updating the urls and i delete the plugin?

  34. Michael

    Thanks so much! Worked like a charm

  35. Shawn Rebelo

    Velvet blues is great, but misses one thing. Does not change URL’s in options if URL’s are there. Say for Custom CSS. Also, anyone have issues of you changing the URL’s, see changes in the DB. But when you go edit the page, they are still say http, when they should be https? Seems to only happen with image URL’s.

  36. jan

    I used this wonderful plugin in the past, always worked fine. But this time it only changed the full URL links, not the internal links that don’t include the full URL. Any ideas on how to fix this?

  37. Blessing Mashoko

    I had the same issue I just changed my permalink settings to “plain” and changed back to the permalink setting I was using and somehow it works.

    • Consultant Nine

      this worked! AWESOME! THANKS!

  38. Priscilla

    The plugin hasn’t been supported in over 1 year and is untested with WP version 4.9.1. Nevertheless, I gave it a try, but unsurprisingly, it didn’t work, giving a MySQL server error. So much for a once very good plugin that the developer decides to abandon!

    • WPBeginner Support

      Hi Priscilla,

      We just tested the plugin and it worked as expected. Please try again and see if the error has resolved or may be the error is unrelated to the plugin.

      Admin

  39. Kokila

    Post update of URL, images are not showing up properly in wordpress admin site. Please comment on this and also URL update didn’t happen for images on Media folder

  40. Gautam Sharma

    After migrating from local to server, I’m getting 404-File not found error. Only my Home Page is loading, rest are not working, I have changed the permalinks also! Please help…

  41. Emma Booth

    Is there anyway I can avoid links from social media breaking once I have done a re-direct?

    I’m trying to re-direct from a wordpress.com blog to a blog on a new domain on wordpress.org, however I’m concerned previous links in tweets and linkedIn posts will break….any way to avoid this?)

  42. sanjeev kumar

    If i tried this but what is for seo how they upadated old link and redirect

  43. Neha Prajapati

    I changed my server keeping same web URL. and properly configured.
    But why my all old post r showing in google search with page not found.
    What to do??

  44. Ben

    I want to merge two websites. Should we install the Velvet plugin on the old or the new site? Thanks

  45. Peter

    I use Velvet Blues with very good results. However, it is important to note that VB will not change URL in widgets or if there are URLs in your CSS code. These will need to be manually changed.

  46. Jeremy

    In response to ADITYA’s comment about this being a substitute for 301 redirects.

    I would say that a find and replace plugin is NOT a substitute for 301 redirects. 301 redirects are still valuable from an SEO standpoint, as well as for users who may have bookmarked or are accustomed to using your old domain.

    Just using this plugin would result in your users hitting an old site that is no longer being maintained or a site that’s been taken offline.

    On a personal note, I definitely recommend Migrate DB Pro for this type of activity. It’s worth the money, if you’re doing local development.

  47. Jennifer

    Hi,

    Does this plug in also work for updating links that are embedded inside tables that I created with TablePress? I also have a number of URLs as part of image descriptions for photos that I added using FooGallery, and i assume that these are stored inside the database, rather than in the HTML for the pages – is Velvet Blues able to update these as well, or do I need a different plug in for that task? My site (which I am going to move from its current directory to a subdirectory of my site that I want to use for an add-on domain) contains about 13.500 images and 500 tables, and it would be extremely tedious to check every single one for links, and then manually replace them with the new URL.

    Thanks.

    • Nico

      Hi,

      I have the same problem changing domain name.
      Had you learn any tip ?

      Thanks

      • Brian

        Does anyone know how to get the url’s updated that are in table press??

  48. Vidy

    Cool plugin and great tutorial, I’ve just migrate my domain and I have 300 post. I searched exactly the plugin u reviewed. Thanks for your help. I didn’t needed to replace my internal link one by one.

  49. Michelle Z.

    Question: I updated my theme, and the blogroll is now on a secondary page, when it used to be on the homepage. So I have the same url but different path. Check it out:

    Old Link (we want to maintain these):

    New Link:

    I tried adjusting the permalinks but its not working…yet. Any ideas?

    Thanks so much!

  50. Sourabh Saraf

    Thanks for the wonderful tut , i usually go for backupbuddy for my migration but sometimes due to server limitations backupbuddy doesnt work . This trick comes handy everytime i manually migrate wordpress and works like a charm .
    cheers
    Sourabh

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.