Go to file
2020-12-08 19:37:51 +01:00
extract_media.rb Initial commit. 2020-12-08 19:37:51 +01:00
finalize_export.rb Initial commit. 2020-12-08 19:37:51 +01:00
README.md Initial commit. 2020-12-08 19:37:51 +01:00
wp_export.xml Initial commit. 2020-12-08 19:37:51 +01:00

Convert your Jekyll blog to Wordpress

This is a small collection of scripts to help you move your blog from Jekyll to Wordpress.

This is pretty dirty code and heavily tailored toward my own needs, so your mileage may vary. But perhaps you'll find it at least a bit helpful.

Features

This will help you import:

  • Posts
  • Tags
  • Images

Usage

  1. Read the scripts and modify them as needed. Change the username, for example. ;-) There are quite a few things in there you'll want to change.
  2. Copy wp_export.xml to your Jekyll data folder and run jekyll build. This will create an export of all your posts in _site/wp_export.xml. Do not import this file in Wordpress yet!
  3. Run extract_media.rb to extract all image URLs used in the export: `ruby extract_media.rb < _site/wp_export.xml

wp_export.images.xml`.

  1. Run finalize_export.rb to modify the image links: ruby finalizy_export.rb < _site/wp_export.xml > wp_export.posts.xml.
  2. Use the Wordpress import plugin to import wp_export.posts.xml (do not activate the import attachments option).
  3. Use the Wordpress import plugin to import wp_export.images.xml, this time activating the option to import attachments.