WordPress Images Wrong Path

WordPress Images Wrong Path Pinguis Website how to fix WordPress

How to correct wrong image urls in database

How to fix WordPress learn how to correct wrong image URLs in database

If you have in posts embedded images with incorrect paths, you must correct it in database.
eg. using sql query like:
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://bad-domainname.com', 'http://correct-mydomainname.com');

 

code to replace wrong url path wordpress database

How to code that replace wrong url path in wordpress database

I have used this SQL  in the SQL section within the WordPress database of one website and it does work, flawlessly.

Don’t rush it. Make sure your URLs are correct both the bad URL and the correct URL.

first login to the WordPress database you ‘want to change

find the database and click the root of the database usually starting with db_ and characters. on the left hand side of your screen. Go up to the top of your screen.

Select SQL to see a blank window, to type your sql code.
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://bridesinmunster.com/www.bridesinmunster.com', 'http://bridesinmunster.com');

See my code above basically UPDATE wp_posts SET post_content = REPLACE(post_content, ‘URL your database is pointing to Now’, ‘URL you want your database to point too’);
Run the code by pressing GO on the bottom right.

I genuinely hope you have succeeded, now go to your website and cleck the images are in present. If not try try again.

Be very Careful and Very Patient. This should be a one time exercise…