admin管理员组

文章数量:1129201

I use an automatic post importer in WordPress and add the images in post content with the external URL, I want to replace the link with the local site links.

DB function could do the trick.

eg: oldlink replace with newlink

Note: there is a 5K images in that way and need to be changed.

I have try to use search replace but not work because changing the externalk URL in the post content winch is I want to keep it. So the tick is to replace only the link with tag

Thanks for your help in advance

I use an automatic post importer in WordPress and add the images in post content with the external URL, I want to replace the link with the local site links.

DB function could do the trick.

eg: oldlink.com replace with newlink.com

Note: there is a 5K images in that way and need to be changed.

I have try to use search replace but not work because changing the externalk URL in the post content winch is I want to keep it. So the tick is to replace only the link with tag

Thanks for your help in advance

Share Improve this question edited Oct 4, 2022 at 11:27 user102195 asked Oct 4, 2022 at 10:48 user102195user102195 111 gold badge1 silver badge3 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I was fixing image URLs in my posts with the next SQL-query

UPDATE wp_posts SET post_content=(REPLACE (post_content, '<old url>','<new url>'));

本文标签: urlsReplace media external links with local links