WordPress Importer

This importer depends on the following third-party gems:

  • safe_yaml
  • sequel
  • unidecode
You may either install the gem(s) individually by running a command with syntax gem install GEM_NAME or install the required gems in a batch by running the following snippet:
gem install safe_yaml sequel unidecode

This importer only converts your posts and creates YAML front-matter. It does not import any layouts, styling, or external files (images, CSS, etc).

Invocation

Sample snippet to invoke the importer:

jekyll import wordpress --dbname DB --socket SOCKET --user USER --password PW --host HOST --port PORT --table_prefix PREFIX --site_prefix PREFIX --clean_entities --comments --categories --tags --more_excerpt --more_anchor --status STATUS,STATUS2

Option <PARAM>Description
--dbname DB

Database name.

Default: ''
--socket SOCKET

Database socket.

Default: ''
--user USER

Database user name.

Default: ''
--password PW

Database user’s password.

Default: ''
--host HOST

Database host name.

Default: 'localhost'
--port PORT

Database port number.

Default: ''
--table_prefix PREFIX

Table prefix name.

Default: 'wp_'
--site_prefix PREFIX

Site prefix name.

Default: ''
--clean_entities

Whether to clean entities.

Default: true
--comments

Whether to import comments.

Default: true
--categories

Whether to import categories.

Default: true
--tags

Whether to import tags.

Default: true
--more_excerpt

Whether to use more excerpt.

Default: true
--more_anchor

Whether to use more anchor.

Default: true
--status STATUS,STATUS2

Array of allowed statuses (‘publish’, ‘draft’, ‘private’, ‘revision’).

Default: ['publish']