How to Export WordPress Posts with Images

Migrating content and posts to another website is a dilemma that many WordPress users have to face at least once in a while. The process of copying specific pages and posts over to a new site involves copying all table rows from one database to another.

Copying data directly using a database management tool such as PHPMyAdmin requires good knowledge of MySQL and a complete understanding of how databases operate.

Fortunately, there’s a more practical solution for exporting posts. By using the default WordPress importer, you can easily export content to another website using an XML file. It allows you to move pages, posts, custom posts types, comments, custom fields, post meta, tags, categories, and even authors.

This article will guide you through the complete process of exporting and importing content between two WordPress websites. The procedure is quite simple and does not require any technical knowledge.

Why Exporting WordPress Blog Posts

why export WordPress posts

Here are 4 main reasons that you might want to import and export WordPress content between your blogs:

Niche Simplification

It’s quite common that you write blogs about different niches; we all have different interests. But if you do irrelevant niches on the same blog, then you may face problems in SEO and targeting audiences.

For instance, publishing blogs about Technology or Tools and providing Travel content on the same website may create a weird feeling to visitors. Plus, Google and SEO tools won’t understand which niche your site specializes in. Consequently, Google decreases your site ranking. SEO tools, at the same time, find it difficult to find your competitors.

Blog Merging

You might be blogging (on different blogs) about many sub-niches of the same niche. For that purpose, you’ve decided to consolidate your efforts for niche dominance.

Take the PFO website as an example. There used to be 2 different websites whose content focuses on WordPress tutorials and mobile apps. However, it takes time to manage them on 2 sites so they decided to migrate them into one and write content on the same Blog.

Domain Change

Are you changing your domain for branding or only running away from huge SEO penalties? The need for a domain change will undoubtedly require you to export your WordPress blog’s content.

Prevent Losing You Work

Your blog can have a considerable chunk of past unrelated content (posts) that might hurt your new niche’s effort. However, instead of deleting these old posts which wastes your efforts, it’s a good idea to find a new home for them.

The WordPress Export Tool

WordPress has its own built-in “Export” tool, which can be found in the main “Tools” menu. It consists of two options – first, you can “Export” your content from one site and then “Import” it into another. Depending on why and what you’re exporting, you may not need the import option at all.

export WordPress posts tools

Bear in mind that this tool is specially designed for moving content from one site to another. It’s not suitable if for those who are changing their domain names. The WordPress export tool is not suited for migrating hosting companies because you need both old and new sites to be up and running at the same time.

You’ll also need to spend a bit of your time on fixing your WordPress settings because none of your settings (plugins, themes, or WordPress itself) will be transferred over.

How to Export WordPress Posts with Images

To export data successfully, you need to have access to both websites. Also, we recommend that you make a backup of the database of both sites so that you’ll be able to restore them later in case anything goes wrong.

After choosing the export tool, you’ll have a few options.

export WordPress posts download export file

What you’ll see here also depends on which plugins you’ve installed. But typically, you should leave the default option selected “All Content” and click on the “Download Export File” button.

DANGER! Where are my Images?

It’s crucial to understand precisely what you’re downloading. The file you’ll get from this whole procedure will be a “.xml” file. It’s a text-based format containing a lot of data.

This file includes all the text of your post, and it will have all the headings, categories, links, creation date, author, etc. as well. But it will not include any of your media/image files. There will be a link to those media files, but not the actual files.

Important Tip: Don’t get fooled by the “Media” option under “Choose what to export”. It doesn’t allow you to export the actual media files either. In fact, it only exports a .xml file containing links to those media items.

How to Export WordPress Posts with Images

If you’re using the tool for what it was designed for – then you don’t have to export the image files themselves as it already covers that feature.

The import tool asks you different kinds of questions about how you would like to import the data you’ve exported. One of the options is “Download and import file attachments”.

export WordPress posts selected content

Choosing that option will fetch the images from your old site. Now you’d need to add them to WordPress “Media Library”, then update the photos in your posts so that they can load from the new website.

If you don’t select that option, the images will still be loaded from your old site. As a result, when you shut that site down, all of your pictures will be broken on the new site.

That’s why you’d have to have both the new and old sites to be up and running during the complete import/ export procedure.

What If You Need the Media Files too?

In case you do want the images/ media files with the exported .xml file, the best way is to zip the entire file /wp-content/uploads/folder and download that.

Just remember that there might be a lot more embedded images than you were expecting, since each time you upload the image to your site, WordPress automatically creates copies of it in various sizes, e.g. thumbnails and full size images.

You will need to use the file manager within your cPanel to handle all of this.

How to Export Specific Blog Posts in Different Categories

If you’ve got specific posts that you want to export in a particular category, all from the same author, then what will you do?

To put this into context, let’s say you have ten blog posts and want to export only 4 out of those 10 posts.

export WordPress posts add new user

Simply go to “Users > Add New”, then create another dummy User with the role of Author. You can name it anything you want. After creating a dummy email, generate a password and save it.

export WordPress posts quick edit

Once creating a user, go to all the specific posts you want to export and change their Author to the new Dummy one, i.e. go to “Posts > All Posts”.

export WordPress posts update

Next, find the post you want and click on the “Quick Edit” option just below the title. Then locate the “Author” option and switch it to the Dummy one. Don’t forget to “Update” the changes. Do this for all your deisred posts.

export WordPress posts download files

When you’re done with this, go back to “Tools > Export” and select “Posts”, but under the new Author specification (the Dummy Author). Also, don’t forget to tick the “Export media with selected content” checkbox.

After that, click on the “Download Export File” button; and congratulations, you’ve done it!

What to Consider When Exporting WordPress Posts

  • If you’ve got a lot of different blog posts, the right idea would be to export your posts in a few batches. To do so, you can change the date range during the export process and import the files into their new location.
  • You can use different plugins to export blog posts from a WordPress website.
  •  While importing/exporting posts, don’t forget to assign authors to them, so that the posts on your new site are consistent with the ones on your old site.
  • Another thing is you should move the images embedded into the content via FTP because they matter as much as the featured images. While you’re at it, make sure that the URLs to the images are correct.

Bonus Tip: Export WordPress Posts with Images to PDFs

Besides exporting site content to a new site, there may be times when you intend to export some of your blogs to a PDF file. They can be a series of a topic and you plan to summarize them as a guide and send them to subscribers.

In this case, you need support from the Watermark WordPress Files plugin. It allows you to convert a single post and page, multiple ones, or a whole category to a PDF file with just a click.

It’s possible for you to add a header, footer, image cover, table of contents, as well as displaying page numbers on the exported file.

More importantly, your converted PDF will include images in the content so you don’t have to worry about exporting them along with the PDF file.

You can refer to this doc on how to export WordPress pages and posts to PDF files here.

Ready to Export WordPress Posts?

The WordPress importer enables you to migrate all content from one website to another. But genuinely speaking, it’s not an ideal solution to relocate a full website since all your settings won’t be transferred.

Also, it’s worth mentioning that the WordPress file upload limit is applied to the WordPress importer. The default value defined by most hosting providers is 8MB and sometimes 2MB. This can be a problem for you when you’re importing a large number of posts and pages.

In order to resolve this, you’ll need to increase the maximum file upload limit. This can be done by contacting your hosting company to increase the file upload limit as you want.

Do you still have a question about how to export WordPress posts with images? Drop a line in the comment section below to let us know