Title: Export media with selected content (by DKZR)
Author: joost de keijzer
Published: <strong>🍂 🔟 15, 2016</strong>
Last modified: 🍂 9️⃣ 3, 2026

---

Search plugins

![](https://ps.w.org/export-media-with-selected-content/assets/icon.svg?rev=3306467)

# Export media with selected content (by DKZR)

 By [joost de keijzer](https://profiles.wordpress.org/joostdekeijzer/)

[Download](https://downloads.wordpress.org/plugin/export-media-with-selected-content.2.1.4.zip)

 * [Details](https://emoji.wordpress.org/plugins/export-media-with-selected-content/#description)
 * [Reviews](https://emoji.wordpress.org/plugins/export-media-with-selected-content/#reviews)
 *  [Installation](https://emoji.wordpress.org/plugins/export-media-with-selected-content/#installation)
 * [Development](https://emoji.wordpress.org/plugins/export-media-with-selected-content/#developers)

 [Support](https://wordpress.org/support/plugin/export-media-with-selected-content/)

## Description

When selecting one post type in the WordPress export screen, by default the linked
media (attachments) are not included.

This plugin adds an “Export media with selected content” option. When checked, the
plugin tries to find featured images and included media in the post_content, adding
them to the export file.

## Screenshots

[⌊"Export media with selected content" checkbox option now available in the Export
screen.⌉⌊"Export media with selected content" checkbox option now available in the
Export screen.⌉[

“Export media with selected content” checkbox option now available in the Export
screen.

## Installation

 1. Upload the plugin files to the `/wp-content/plugins/export-media-with-content` 
    directory, or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress

## FAQ

### Images seem to be missing in the export file

This plugin hooks into the WordPress export routine and _tries_ to find images related
to the post (page, etc.). It does so by looking for “attached” (uploaded to) media
and it searches the body of the post (the post_content) for image files.

It’s possible that themes or plugins use different ways of referencing media to 
your post. This plugin will not find those.

### The images are imported into the new site but eg. my galleries are broken

In eg. the Gutenberg gallery block, when you select an image size (for the gallery)
the images with that size are ‘hard-coded’ in the html.

The WordPress import routine downloads the original image of the ‘export site’ and
re-creates the configured image sizes. When your configured image sizes differ, 
you might end up with broken galleries.

So make sure both sites have the same image sizes configured. See the Media settings
in both sites and check if themes or plugins use `add_image_size()` [reference](https://developer.wordpress.org/reference/functions/add_image_size/).

### Can I (have somebody) extend this plugin?

Yes! The plugin features two filter hooks:
 * `export_query` * `export_query_media_ids`

Please browse the code to see what they do, I guess `export_query_media_ids` is 
easiest to use as it requires you to just add more attachment IDs to an array.

## Reviews

![](https://secure.gravatar.com/avatar/c27ec425eeb70515e787520b05bc9af402332de7c5f38d3be48145fd956d8f63?
s=60&d=retro&r=g)

### 󠀁[Very discreet but incredibly powerful!](https://wordpress.org/support/topic/very-discreet-but-incredibly-powerful/)󠁿

 [mengeco](https://profiles.wordpress.org/mengeco/) ❄️1️⃣ 12, 2026

This plugin adds only a small, almost invisible option to the native WordPress export,
but it solves ALL the problems I had with the WordPress solution.This fantastic 
addition should be built into WordPress.A huge thank you to the developer!

![](https://secure.gravatar.com/avatar/f35b39790c577a606b1ff0dd63066b8a0752fa73a7ba6d9686707fc716d7b376?
s=60&d=retro&r=g)

### 󠀁[Works flawlessly](https://wordpress.org/support/topic/works-flawlessly-208/)󠁿

 [davewilkinson](https://profiles.wordpress.org/davewilkinson/) ☀️ 6️⃣ 26, 2025

Does what it says on the tin, importing posts with featured images. Thanks!

![](https://secure.gravatar.com/avatar/c263db50040d69c4b1b56833129332b46eccda4ca6de9b4eb41781c8fc59b5da?
s=60&d=retro&r=g)

### 󠀁[Awesome Plugin](https://wordpress.org/support/topic/awesome-plugin-7235/)󠁿

 [mlabmedia](https://profiles.wordpress.org/mlabmedia/) 🍂 9️⃣ 3, 2024

This plugin is great, I appreciate you!

![](https://secure.gravatar.com/avatar/866ace2d67d6539de64ed0c0b31cba5c6fbdb15ca8736d1d0b594df7563a07ec?
s=60&d=retro&r=g)

### 󠀁[Just works!](https://wordpress.org/support/topic/just-works-778/)󠁿

 [Kori Ashton](https://profiles.wordpress.org/koriashton/) 🌸4️⃣ 6, 2024 1 reply

Finally found the right plugin! This one actually exports the media and imports 
it correctly to your media library. Everything came over perfectly! Thank you for
providing such an excellent plugin for us!

![](https://secure.gravatar.com/avatar/7cbd3b515a7227cba30f6ab7a14208d739ce2f3fd19feff72263e2e4e2ac6a40?
s=60&d=retro&r=g)

### 󠀁[Works Great](https://wordpress.org/support/topic/works-great-9004/)󠁿

 [WillOfTheWeb](https://profiles.wordpress.org/willoftheweb/) 🍂 🔟 17, 2023

Wow awesome, it works great. I've been looking for something like this for some 
time now.

![](https://secure.gravatar.com/avatar/389ef66b5c6dd150bd5ee25f729de3855d11d19339270a44780ce9ac89e83633?
s=60&d=retro&r=g)

### 󠀁[Just perfect plugin!](https://wordpress.org/support/topic/just-perfect-plugin-4/)󠁿

 [Oleskii Kaliuzhnyi](https://profiles.wordpress.org/alexeyk/) 🗓️🗓️7️⃣ 25, 2023

Works exactly as expected! Happy to have this plugin, saved me a lot of time while
migrating content.

 [ Read all 93 reviews ](https://wordpress.org/support/plugin/export-media-with-selected-content/reviews/)

## Contributors & Developers

“Export media with selected content (by DKZR)” is open source software. The following
people have contributed to this plugin.

Contributors

 *   [ joost de keijzer ](https://profiles.wordpress.org/joostdekeijzer/)

[Translate “Export media with selected content (by DKZR)” into your language.](https://translate.wordpress.org/projects/wp-plugins/export-media-with-selected-content)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/export-media-with-selected-content/),
check out the [SVN repository](https://plugins.svn.wordpress.org/export-media-with-selected-content/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/export-media-with-selected-content/)
by [RSS](https://plugins.trac.wordpress.org/log/export-media-with-selected-content/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.1.3

 * prevent sql error when ID turns out to be NULL (props donnyoexman)

#### 2.1.2

 * Stupid debug error fix

#### 2.1.1

 * Added php 7.0 requirement to plugin header
 * Replaced short array notation with full notation so plugin could work on lower
   php versions (untested)

#### 2.1

 * Performance: split queries & prepare attachments_map (props Albitos)
 * Feature: support for [playlist] shortcode
 * Feature: support for Gutenberg Audio and Video blocks
 * Tested with WordPress 5.6.2

#### 2.0

 * Feature: support for Gutenberg notation of images and gallery
 * Feature: added `export_query_media_ids` filter
 * Tested with WordPress 5.2.3

#### 1.1

 * Tested with WordPress 5
 * Includes “Uploaded to” media

#### 1.0

 * Bugfix when only posts from 1 category must be selected
 * Feature: introduced `export_query` filter to allow for hooking into this plugin

#### 0.9.1

 * Sanitize input

#### 0.9

 * Initial release

## Meta

 *  Version **2.1.4**
 *  Last updated **1 month ago**
 *  Active installations **40,000+**
 *  WordPress version ** 4.5 or higher **
 *  Tested up to **7.1.3**
 *  PHP version ** 7.0 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/export-media-with-selected-content/)
 * Tags
 * [attachments](https://emoji.wordpress.org/plugins/tags/attachments/)[export](https://emoji.wordpress.org/plugins/tags/export/)
 *  [Advanced View](https://emoji.wordpress.org/plugins/export-media-with-selected-content/advanced/)

## Ratings

 4.5 out of 5 stars.

 *  [  78 5-star reviews     ](https://wordpress.org/support/plugin/export-media-with-selected-content/reviews/?filter=5)
 *  [  2 4-star reviews     ](https://wordpress.org/support/plugin/export-media-with-selected-content/reviews/?filter=4)
 *  [  3 3-star reviews     ](https://wordpress.org/support/plugin/export-media-with-selected-content/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/export-media-with-selected-content/reviews/?filter=2)
 *  [  10 1-star reviews     ](https://wordpress.org/support/plugin/export-media-with-selected-content/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/export-media-with-selected-content/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/export-media-with-selected-content/reviews/)

## Contributors

 *   [ joost de keijzer ](https://profiles.wordpress.org/joostdekeijzer/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/export-media-with-selected-content/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://bunq.me/jstdkzr?description=Open+Source+WordPress+plugin+support&amount=25)