0

I have to copy content from different website. I copied whole webpage and paste it in my post. All works fine. I also get images in my post but they are still linked to older website.

Is there any plugin or way so that I will check for all such image URL called from other website? Plugin could copy upload files and then show from our website instead showing it from old one.

1

1 Answer 1

0

I don't know of a plugin! Wordpress stores uploaded images in a media library which puts them in the posts table. As you have copied and pasted they are not in the media library, but just as img tags in the posts/pages themselves.

Step 1 - copy the image files themselves, using an FTP to download them all then put them in newdomainname.com/wp-content/uploads/2015/04 - ie this months upload folder! Step 2 You can log into PHPMyAdmin to quickly update all the images in the posts/pages. Change the urls ;-)

UPDATE wp_posts SET post_content = REPLACE (post_content, 'src="http://www.oldsiteurl.com', 'src="http://yourcdn.newsiteurl.com');
UPDATE wp_posts SET  guid = REPLACE (guid, 'http://www.oldsiteurl.com', 'http://yourcdn.newsiteurl.com') WHERE post_type = 'attachment';

That won't have put the images in the media library for making thumbnails, feature images etc, but it will have moved them over.

You can then use https://wordpress.org/plugins/add-from-server/ to add the uploaded images into the library.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.