How to Quickly Fix Broken WordPress Images after Domain Change

May 25, 2020 | Tutorials , WordPress , WP Fixes | by Mihovil Mikulec
How to Quickly Fix Broken WordPress Images after Domain Change

Your WordPress images are broken after a domain change or a site transfer? Don’t worry, your images are NOT lost. Here is how to fix broken WordPress images.

Why are my WordPress images not showing up?

When you are adding images into your posts or pages, WordPress inserts their full address paths (URLs) and stores them in the database. So, if you change your WordPress domain, site URL or folder where your WordPress installation is located, you need to adjust all of those image links accordingly.

Luckily, you don’t have to update all of your image links manually.

Fix broken WordPress images after domain change or site transfer

The easiest way of doing this is by using a plugin. Install and activate WP Migrate DB plugin.

WARNING: Before you continue, BACKUP your database!

STEP 1: On your WordPress dashboard sidebar go to Tools -> Migrate DB. This will open plugin’s settings page, which looks something like this:

Default interface display of Migrate DB plugin

Find fields will display your current WordPress site URL / domain and file path.

STEP 2: Click on Find & Replace radio button. This option will tell the plugin that you want to take the action on live database (the one you want to fix).

STEP 3: Next to the empty field that says “New file path”, there is a small X icon, click on it to remove that field.

STEP 4: In the remaining find field, instead of domain.tld or whatever shows in your case, enter your OLD WordPress site URL / domain. The one you used before the domain change or server transfer.

STEP 5: In the remaining replace field enter your CURRENT WordPress site URL / domain. The one you are using now, after the domain change or server transfer.

Now your plugin interface should look something like this:

Adjusted interface display of Migrate DB plugin

This works for subdomains and folder paths as well, example:

//sub.domain.tld
//domain.tld/folder
//sub.domain.tld/folder

STEP 6: After you are done, press the Find & Replace button at the bottom of the page to start the process. After the process of search and replace is finished, you will see the following message:

"Find & Replace complete" display of Migrate DB plugin

That is all, your image links should now be fixed! 🙂

You can now delete the plugin.

Conclusion

Regardless if you are a beginner or an expert WordPress developer, this is something you will have to or you already are doing very often. Hopefully, this tutorial will help you streamline your process of WordPress domain changing and site transferring, while keeping your websites fully functioning and stable. 🙂

Please leave a comment below and share your WordPress transfer experiences with us. What are your biggest issues with it? What approach do you use?

Need someone to take care of your WordPress website?

The easiest way to describe WordPress care services is to say that they bring peace of mind to WordPress site owners and save their time. But not only that, proper WordPress maintenance and monitoring can prevent a lot of potential problems on your website and make it perform faster and better, helping you attract and convert new clients.

  • Speed
  • Security
  • WP updates
  • Daily backups
  • Hosting
  • Uptime monitoring
  • Spam protection
  • SSL certificates
  • Malware removal
  • Form testing
  • SEO blacklist checkup
  • Database optimization
  • Activity monitoring
  • Technical support
  • Free migrations
Mihovil Mikulec
Mihovil Mikulec
Thank you for reading! I am owner of Soulstudio, WordPress developer with 10 years of experience behind me. My primary focus is on WordPress hosting, security and performance. You can contact me directly at [email protected]

Soulstudio


Who we are

What started in 2010 as a one-man web development operation is now a small and devoted team of web developers and server administrators.

Our focus is on WordPress hosting and WordPress care services such as speed optimizations, bug fixing and security hardening.

We are located in Croatia (Europe).

Our mission

Our mission is to provide fast, stable and secure hosting environment for your WordPress websites, as well as professional WordPress care services and ongoing user support.

We believe that everybody deserves safe, stable and affordable hosting services. That is why our dedication, commitment and constant learning are reflecting that philosophy.