bf sb bg
bf sb logo
Up to 70% OFF* sitewide
Learn more
100% Australian Owned and OperatedSupport Centre13 24 85Pay an InvoiceLOG IN
supportcentre scaled
Support Centre
Find the answers to your questions and get the support you need with the VentraIP help centre.

Fix image links in your WordPress website

Warning: If you’re uncomfortable completing these steps, please have a professional web developer complete them for you. While we do provide this guide to you, third-party applications do fall outside the scope of our Technical Support. We recommend contacting your developer, or the WordPress community for direct assistance.

If these steps are completed incorrectly, it may cause significant issues that may be difficult to resolve.

Before Proceeding

Before completing these steps, please consider exporting a copy of your website’s database.

When might you want to do this?

  • After completing a migration of a WordPress website, you might find that the image links are broken
  • You have changed a WordPress website’s domain name, and need to update the image links

How to fix the image links

  1. Log in to cPanel.
  2. Click on PHPMyAdmin under Databases.
  3. To the left of the interface, click on the WordPress database you want to fix the image links for.
  4. Click the SQL tab.
  5. Input the following SQL code into the box under Run SQL query/queries on database, ensuring that you replace yoursite.com with your domain(s) accordingly. UPDATE wp_posts SET post_content = replace(post_content, 'old_url', 'new_url');
  6. Click Go.

Didn’t work for your site?

If the process didn’t work for you or has caused problems, you may consider trying any of the following:

misc content center scaled