How to export blog posts: What makes a CSV importable?

To migrate your blog posts, you have to provide a CSV file that contains all the content of your blog posts. Follow the examples and guidelines below to ensure your blog export can be imported into the new dev site.

 

Examples

 

Guidelines

  1. Posts exported with WP All Export (and CSVs exported from WP in general) will nearly always work out of the box, though things like image paths may need to be updated.

  2. The CSV should contain 1 post per row. Multiple CSV files are fine, but each row should relate to a single post item

  3. Each column should contain values pertaining to the same field

  4. Each column should have a title - we can add titles to the columns as long as # 3 is true

  5. Each column should contain data for exactly one field. In general, your content should contain some or all of the following fields.

    1. ID (recommended) - Each row should have some unique identifier (e.g. an ID or URL slug) - we can add a unique identifier if one does not exist, however, the post id from the database is preferred. If using a generated ID, it may take additional time/resources should we need to do a second import or update the existing posts

    2. Title (required) - This should be the display title to be shown on the post and index. Should be formatted as you'd like it to appear on a single post and index pages (e.g. sentence case, no HTML)

    3. Content (required) - Should contain the HTML or text content for an entire post. This may contain inline images (see note on images below). Any inline styles or CSS will be preserved and may collide with theme defaults.

    4. SEO title (Recommended) - Should include the title, formatted as it should appear in search results

    5. SEO description and/or Excerpt (Recommended) Should include the description or short version of the content as it will appear in search results and on index pages. If none is provided, a shortened version will be generated from content

    6. Image URL (Recommended) - A single image URL to be used as the post or "thumbnail" image. This appears on index pages, lists, and at the top of a single post. If no post is provided, a placeholder may be shown

    7. Category or categories (recommended) - A single category, or comma-delimited list of categories (should all be contained in one cell)

    8. Tag or Tags (optional) - A single tag, or comma-delimited list of tags (should all be contained in one cell)

    9. Publish Date (recommended) - The date of the original publication, if applicable. If no date is provided, the posts will be assigned a timestamp based on when the migration operation was completed. This may change the display order of posts on your index and in lists/cards

  6. If your posts contain field data not mentioned in the list above, please let us know so we can try to accommodate those fields

     

Notes on Images

  1. Image paths should be absolute URLs

    1. Correct - https://yoursite.com/image-path/filename.jpg

    2. Incorrect - /image-path/filename.jpg

  2. Image paths may be case-sensitive, depending on your server type and configuration. The paths should be exported exactly as the files are named on your server

  3. Our dev server should be able to download image files directly from your production server or CDN. This may require that you add our server to your allowed list, or remove any restrictions that prohibit accessing images directly.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.