Fix: WordPress Post Imports Without Images

Fix - WordPress Post Imports Without Images

Here’s the scenario. You’re using WordPress’s import/export tool and everything works except for one thing.

Your images aren’t imported. What do you do? For your sake, I hope you have not deleted your old site yet.

Option 1

This would be cleanest option as far as results are concerned. First, delete all the imported posts on the new site. You’re going to start over. This time, when you export, instead of choosing posts or pages. Just choose all content.

WP-export-tool

Import into your new site again, making sure to check the box to import attachments.

wp-import-attachments

Yes, it will bring over stuff you don’t need and yes, it’s going to be inconvenient to delete but at least the import is intact. Most times anyway.

Option 2

What if the image import failed or you have too many posts to delete? Before going forward, let me just remind you to backup both files and database of both sites first!

If that still didn’t work, what you can do is to keep the import. Now, go back to your old site, via FTP. Download the uploads folder (it is inside the wp-content folder) to your computer. Next, still via FTP, log into your new site and upload the contents of the uploads folder into your new site’s wp-content folder.

FTP-uploads-folder

Mac users, if importing into an existing site with already uploaded content, be careful here because many Mac FTP programs instead of merging the content, they wipe out the uploads folder. So you may have to open each folder and upload separately if they already exist.

Once all all files are uploaded, you will need to change the URL’s of your images from the old site to the new. Again, before you proceed. Make sure you have a backup because this next step is potentially destructive on the new site.

Go to Add Plugins and look for Search and Replace. Install and activate this plugin.

search-replace-plugin

After the plugin is installed, go to the settings screen for the plugin. Check the search in posts box.

WP-search-post-content

In the search field, enter the old URL. Up to the dot com is sufficient. In the replace field, enter the URL of the new site. Hit Go.

WP-replace-text

Check your posts with images to see if the images are being pulled from the new site. They should. There’s only one problem with this – these images do not show up in your media library anymore. 99% of the time, this is no issue at all. If this is a real problem, I’d suggest not using the import/exporter altogether. Instead, use a cloning tool like BackupBuddy and the likes.

These tools will transfer your posts with much less problems.

Do You Want A Hands-Free Business?

Then get this guide to help you systemize your business so you'll have more time working on your business.

!
!

Hey! I want to make sure you know what you're getting here. In addition to the guide, you will also receive our memo that includes special offers, announcements and of course actionable information.

Terms and Conditions checkbox is required.
Something went wrong. Please check your entries and try again.
Facebook Comments

2 Comments

  1. Sarah Arrow on July 3, 2015 at 8:14 am

    Very handy Lynette. I always wondered if you could download the images folder and then add it to the new site. It’s handy to know to move the right folder properly. Can you delete the plugin afterwards or do you have to keep it?



    • Lynette on July 5, 2015 at 2:02 pm

      Yes. It works because WordPress uses absolute URLs so as long as you have the url/file structure down, you can always re-upload your images.

      The down side is, these images may not be in your media library anymore because WordPress isn’t aware of them in the database. I’ve done this on many client sites and almost always, this isn’t a problem. Most people don’t do anything with those images again after posting.

      Are you asking about the search and replace plugin? Yes. I would do that if you’re going to only use it once.