WordPress Export Posts with Images

To export posts with images in WordPress, go to WP All Export › New Export and pick Posts from the available list of post types. Build the desired export layout with the Drag & Drop interface, then run the export and download the exported posts and their images.

This documentation covers how to export WordPress posts using WP All Export. For a broader look at exporting WordPress posts, check out:

Step 1: Create New Export for Posts with Images

Navigate to All Export › New Export and select Posts from the dropdown list.

Export Posts with Images New Export

When needed, Add Filtering Options to control which WordPress posts will be exported.

Click on Customize Export File to continue.

Step 2: Customize the WordPress Posts Export 

The Drag & Drop interface appears, where you build the export template.

To include data in an export, drag fields from the Available Data section on the right and drop them into the column selection area on the left:

Export Posts with Images Drag and Drop Interface

To remove an export column, drag it out of the column selection area and drop it anywhere else on the interface.

To learn about the different sections available when exporting posts, you can review Customize the WordPress Post Export File.

In this document, we will focus on the Media section, which contains the image and attachment fields associated with WordPress posts. To include images in your export, you must drag fields from this section into the column selection area.

The remainder of this section provides detailed descriptions of the relevant fields.

Media › Images

The data associated with images on your WordPress posts will appear here. The following fields are available:

  • Image URL: URL to the image.
  • Image Filename: Filename of the full-size image.
  • Image Path: Path or location (on the server) to the image.
  • Image ID: The attachment ID of the image.
  • Image Title: The image title.
  • Image Caption: The image caption.
  • Image Description: The image description.
  • Image Alt Text: The image alternative text.
  • Image Featured: The URL of the featured image.

Multiple values are separated by a pipe "|" character.

Export Posts with Images Media Image Data

Media › Attachments

The attachments uploaded to your WordPress site generate the same types of fields, as shown below:

  • Attachment URL: URL to the attachment.
  • Attachment Filename: Filename of the attachment.
  • Attachment Path: Path or location (on the server) to the attachment.
  • Attachment ID: The attachment ID of the attachment.
  • Attachment Title: Attachment's title.
  • Attachment Caption: Attachment's caption.
  • Attachment Description: Attachment's description.
  • Attachment Alt Text: Attachment's alternative text.

If there are multiple attachments per post, the different values are again separated by a pipe "|" character.

Export Posts with Images Media Attachments Data

Media from Custom Fields

If your media is stored in a different way, i.e., embedded in a serialized array inside a custom field, you can still export it. You just have to write custom PHP code as explained in the guide: How to Pass Exported WordPress Data Through PHP Functions.

Basically, you must apply custom code to that custom field. Your code should process the data entirely, locate the specific data that you wish to extract, and then return it.

While we may be able to provide examples in some scenarios, we don't help with custom coding. For that type of assistance, you can reach out to one of our recommended developers.

Step 3: Run Export and Download WordPress Posts with Images

After setting up the export template, click on the Continue button at the bottom of the page (not shown). Next, you'll see the Export Settings screen:

Export Posts with Images Export Settings

This interface lets you modify the default export settings. You can add Scheduling Options or change Advanced Options. Once you're ready to run the WordPress posts export, click on Confirm & Run Export.

You will see the following screen once the export completes:

Export Posts with Images Export Complete

On this screen, you can download the exported file in the selected format (i.e., CSVXMLExcel) or as a Bundle file that you can import using WP All Import.

Export Posts with Images — Advanced Topics

Schedule your WordPress Posts Export

You can schedule any WordPress posts export using either of our integrated Scheduling Options:

Export Posts with Images Manual Cron Jobs

Send Export Posts and Images to an External App Using Zapier

WP all export can send the exported data to any third-party app available in Zapier. This will let you integrate your post exports with whatever tool you need, such as Gmail or Google Drive.

To learn more, visit: How to Send Exported WordPress Data to Zapier.

Modify Export Data Programmatically

If you need to modify any data that's being exported, you can use custom code. For example, here is how to change a URL from https://example-debug.com/ to https://example.com/.

Export Posts with Images PHP Export Field

This is the function used:

 
function my_replace($value){
	return str_replace("https://example-debug.com/","https://example.com/",$value);
}

Learn more about this in the guide: How to Pass Exported WordPress Data Through PHP Functions.

Frequently Asked Questions About Exporting Posts with Images

How to Export Posts from WordPress?

  1. Create a new export and choose Posts.
  2. Select the export fields that you want to include in the export.
  3. Run the export.
  4. Download the exported WordPress Posts and review the contents of the export file.

To learn more, see How to Export WordPress Posts.

Does a WordPress Export Include Images?

Not by default, but you can use the procedures described in this document to include images with your post export or any other post type that has images or attachments.

For a broader description of WP All Export's capabilities, see Export WordPress to CSV, XML, or Excel.

How To Export All Images from WordPress?

WP All Export doesn't allow exporting the Media Library out of the box, so you have to export the post type or custom post type and then include its associated images in the export, exactly as we've demonstrated in this document.

However, there is a workaround using a WP_Query export (see documentation) to generate an export file with all of the media or attachments that exist on your site. This is the query:

'post_type' => 'attachment', 
'post_status' => 'inherit'

Related Docs

Create or modify filters added to the export.

Learn more about exporting WordPress Images and attachments.

Explains in simple steps how to import WordPress posts using WP All Import.

Lifetime support. Lifetime updates. Pay once.

Packages
Standalone
Import
Pro Package
$249
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Import + Export Pro Package
$299
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
WooCommerce Import Package
$149
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Import Standalone
$99
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Import + Export Standalone
$169
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Export Standalone
$99
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
cross