Convert Drupal to WordPress

drupal to wordpressI have used Drupal for the last year or two and have finally gotten fed up with it. There are plenty of places online that discuss the benefits and drawbacks of each platform so I won’t do it here.

The main thing keeping me from going back to a simple WordPress installation was an easy way to move all my old content out of the Drupal CMS in a manner that would be simple to move it into a WordPress CMS.

I looked at some Modules built specially to do the task. I looked at some pay software as well. None of those options did what I needed. Even the pay program had poor reviews.

I stumbled upon a way to use one of the modules that I already had to do the export. Using the Views Module I built a custom display to make an XML data document. I selected the following Fields.
Content: Title (Title)
Content: Nid (Nid)
Content: Node UUID (Node UUID)
(author) User: Name (Name) [add Content: Author uid to CONTEXTUAL FILTERS in order to select this.]
Content: Published (Published)
Scheduler: Publish on (Publish on)
Content: Post date (Post date)
Content: Body (Body)
Content: Image (Image)
Content: All taxonomy terms (All taxonomy terms)

Go into the XML Settings and rename the Root element name. Duplicates called ‘node’ will be a problem upon importing. For me it cause only the first item to get imported.

Set the Date format to Custom. Look at PHP manual for possibilities, I used “D, d M Y H:i:s”.

Depending on how you’ve built your content this may be enough or you might want to pick a few more.

This almost worked straight away but I was having trouble with the Body content only showing up partly. I solved that by go to Home » Administration » Configuration » Content authoring » Text formats then, Enabled filters » Display any HTML as plain text. Do this for each content type. This makes for a junk website so reset it after you’ve captured the XML document.

Once you have it the way you want you’ll need to set the Pager to show all items (usually by using ‘0’).

Now you’ll have to install another module to the WordPress isntallatino I used WP All Import

Follow the instructions and it’s simple enough. There were a couple things I wasn’t able to do in one step.

The second is set Post Status. I solved this by using the Filter in Step 2 and filtering on Published equals Yes or No. I import once for each case and set Post Status in Step 4 as applicable.

Third, I used


for the Body.

The fourth thing I couldn’t do without paying for the Pro version is set the Featured Image. My workaround for this was to add the following to the Body:

<img title=”{Title[1]}” src=”{Image[1]}” alt=”” align=”right” />