Fix-Images-and-Broken-Links-by-Updating-Paths-in-WordPress

Fix Images and Broken Links by Updating Paths in WordPress

  • August 24, 2022

Today we will learn how to fix broken images link issue in WordPress, after migrating site from local server to live server or (one domain to another). This is a very common issue.

The simple way to fix this issue is just update post_content in wordpress database

Just run below mention SQL query in your database using phpmyadmin

UPDATE wp_posts SET post_content = REPLACE(post_content, 'localhost/test/', 'www.yourlivesite.com/');

Note: replace the table prefix according to your WordPress table prefix

If your website is created with Elementor then you need to perform a additional step to change the broken links.

Replace the URL in Elementor tools

That’s it, after performing these step your broken link issue will be resolved.

Related Post

Insert post programmatically in WordPress

Insert post programmatically in WordPress

Today we are gonna learn how to insert post in database programmatically. The function we are going to use is wp_insert_post() For creating a post first you need to create a post array, below is […]

Hide product category or product on shop page

Hide product category or product on shop page

Hello Guys today we gonna learn how can we hide specific product category, specific product on shop page. We are going to do this with the help of code snippets. You can directly add these […]

add-conversion-tracking-code-in-thank-you-page-woocommerce

Add conversion tracking code in thank you page Woocommerce

Hi Guys Today we are going to learn how to add conversion tracking code in order thank you page. We will do this using custom snippet in function.php