Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import wordpress posts with images and featured images? [closed]

Tags:

wordpress

I have used Tools->import&export but it didn't work. I have tried using Wp-All-Import and Export plugin then also it is not working. Only the content imported not the images. How to fix this issue. Is there any way to import posts with images?

like image 974
Padmini Maddur Avatar asked Feb 22 '17 13:02

Padmini Maddur


People also ask

Does WordPress export include images?

Images. An XML export can move your images and other media. However, it's important to know that XML export files don't contain any actual images or media files. They contain links to images and other media, which will transfer to the new site after you import the XML file to that site.

How do I export all posts from WordPress?

To export WordPress posts, go to WP All Export › New Export and select Posts from the dropdown list. Build your export file using the Drag & Drop interface. Once done, export the posts and download the exported file.


1 Answers

The import and export of posts, pages, comments, and media is currently part of WordPress core. So use the default import and export utility to get this done. In this example I export posts but the same goes for pages, etc.

  1. Log into the WordPress website you need to copy from.
  2. On the dashboard go to Tools > Export > WordPress > Posts (install the plugin if needed)
  3. Save the file
  4. Repeat the process but this time choose Media (rename the file so you don't overwrite the prior one)
  5. Log into the WordPress Site to copy to.
  6. On the dashboard go to Tools > Import > WordPress
  7. Select the posts file
  8. Repeat step 6 and upload the media file.

All posts and media files are currently imported.

NOTES:

Although all media is now on the new server, I had to take care of one additional step and rename the domain name for all database entries pointing to the images. I used the below tool to do this. (backup your DB before you proceed just in case...)

https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

Instructions are on their website on how to update DB entries, in my case it had to run the tool and rename www.olddomain.com to www.newdomain.com.

Worked like a charm and Within 10 minutes I had all old data on the new server.

like image 130
Roy Scheffers Avatar answered Sep 30 '22 17:09

Roy Scheffers