Importing data into ExpressionEngine 2 from WordPress

» Visit the DataGrab support page

A brief introduction on how to use DataGrab to import data from a WordPress WXR XML file.

Download the WordPress datatype

DataGrab allows you to add ‘datatypes’ to import different types of data.

Go to: http://brandnewbox.co.uk/products/datatype/wordpress

and download the WordPress datatype. Unzip the file and copy the ajw_wordpress folder to your system/expressionengine/third_party/ajw_datagrab/datatypes folder

(See http://brandnewbox.co.uk/support/details/installing_new_data_types_in_datagrab for more details)

Now in the DataGrab module page you should see a new import option: WordPress

Select this and click on "Create new import"

Download the WordPress datatype

Set up the import

Upload the WordPress export file to you webserver. In the example screenshots, I’ve uploaded the file theme-unit-test-data.xml to my site’s /feeds/wordpress folder (ie, http://ee2.dev/feeds/wordpress/theme-unit-test-data.xml)

Select the channel you wish to import to, and enter the URL to your WordPress file in the "Filename or URL" input. You will probably want to ‘tick’ the "Just import posts?" checkbox (unless you know you want to import other types of posts).

Click on "Check settings"

Set up the import

Check Settings

This should display a quick summary of the fields available from the WordPress file.

Click on "Configure Import"

Check Settings

Configure Import (1/3)

The WordPress datatype will automatically configure the import as much as possible but there are a few fields you will need to set-up.

Most importtantly, you’ll need to decide which field to put the post content in. In the example, I’ve used the "Body" field by selecting the "Content…" option in the pull-down menu.

Configure Import (1/3)

Configure Import (2/3)

You may wish to import the categories. If so, decide which category group to add them to.

Configure Import (2/3)

Configure Import (3/3)

You can set up a default author for the posts, or you can try and get DataGrab to assign posts to existing members.

See: http://brandnewbox.co.uk/support/details/assigning_authors_to_entries_with_datagrab for more details.

Click on "Do import" to start the import process.

Configure Import (3/3)

Results

DataGrab should import the WordPress posts and comments, retaining the posts’ original dates and statuses where possible.

Results