WordPress.com Importer
This importer depends on the following third-party gems:
- hpricot
- open_uri_redirections
- safe_yaml
gem install GEM_NAME
or install the required gems in a batch by running the following snippet:
gem install hpricot open_uri_redirections safe_yaml
Invocation
Sample snippet to invoke the importer:
jekyll import wordpressdotcom --source FILE --no-fetch-images --assets_folder FOLDER
Option <PARAM> | Description | ||
---|---|---|---|
--source FILE |
WordPress export XML file |
Default: 'wordpress.xml' |
|
--no-fetch-images |
Do not fetch the images referenced in the posts |
Default: false |
|
--assets_folder FOLDER |
Folder where assets such as images will be downloaded to |
Default: 'assets' |
ProTip: WordPress.com Export Tool
If you are migrating from a WordPress.com account, you can access the export
tool at the following URL:
https://YOUR-USER-NAME.wordpress.com/wp-admin/export.php
.
Further WordPress migration alternatives
While the above method works, it does not import much of the metadata that is usually stored in WordPress posts and pages. If you need to export things like pages, tags, custom fields, image attachments and so on, the following resources might be useful to you:
- Exitwp is a configurable tool written in Python for migrating one or more WordPress blogs into Jekyll (Markdown) format while keeping as much metadata as possible. Exitwp also downloads attachments and pages.
- A great article with a step-by-step guide for migrating a WordPress blog to Jekyll while keeping most of the structure and metadata.
- wpXml2Jekyll is an executable windows application for creating Markdown posts from your WordPress XML file.