Import File Attachments (Media) with WordPress Importer Redux

Have you used the WordPress Importer to import content from one WordPress site to another, and noticed that your media (images, PDFs, etc.) aren't importing into the Media Library? I'll show you how to solve this frustrating problem with the WordPress Importer Redux plugin.

Unfortunately, it's been known since at least 2013 that the official WordPress Importer plugin rarely imports file attachments. The official WordPress Importer won't even try to import your file attachments (the items in your Media Library) unless, when you export, you choose All content. If you choose any of the other options (such as Posts or Pages), then when you import, you won't get file attachments, even if you check the box to download them.

Fortunately, some developers created WordPress Importer Redux, which was meant to replace the official WordPress Importer. Sadly, development has stalled, and the broken official importer remains in place. But, WordPress Importer Redux works, and does so much better than the official importer!

How to Use WordPress Importer Redux

  1. On the site you want to export from, go to Tools > Export. Select All content. Click Download Export File.
  2. Download the WordPress Importer Redux plugin (link is to .zip file on GitHub).
  3. On the site you want to import to, go to Plugins > Add New. At the top of the screen, click Upload Plugin. Upload the .zip file you downloaded. Activate the plugin.
  4. Go to Tools > Import. Under WordPress (v2), click Run Importer. Upload the XML file you exported from your other WordPress site. Click Start Import.
  5. Review the Import Summary. Assign authors. Check the box to Download and import file attachments. Click Start Importing.

The WordPress Importer Redux plugin does a much better job than the official WordPress Importer. The only issue I've had is that it inserts backslashes (\) before single quote marks (') in comments. Fortunately, this is easy to fix.

WordPress Importer Redux Import Settings
WordPress Importer Redux Importing

Remove Backslashes from Comments

Go to Comments and see if backslashes (\) have been inserted into your comments. If they have, let's remove them.

  1. Back up your database (or entire site)!
  2. Install the Better Search Replace plugin.
  3. Go to Tools > Better Search Replace and copy and paste these values:
    1. Search for: \'
    2. Replace with: '
  4. Select tables: wp_comments (yours may look like wpXXX_comments)
  5. Uncheck the box Run as dry run?, then click Run Search/Replace.
Better Search Replace

Get a Professional Website Built by WordPress Experts

Is your goal to have a WordPress website that looks professional and generates leads for your business? Contact us to learn how we can help!

Filed Under: 
Tagged With: , ,

Want tips to rocket-boost your website?

Simply sign up.
Ready to Blast Off?

Let's talk.

Contact OptimWise
crossmenuarrow-right