Website Migration from WordPress to Drupal

This tutorial will walk you through migrating the contents of a WordPress-built website to Drupal 8.

Exporting Contents from WordPress

1. Log in to the dashboard of your WordPress website.

2. Go to Tools > Export.

WordPress Contents Export

3. Tick the checkbox for All content under the heading Choose what to export.

This option will export all posts, pages, comments, custom fields, terms, navigation menus, and custom posts.

Please note that the maximum .xml file size that Drupal accepts is 2MB. If your file exceeds the limit, you will need to export your Posts and Pages separately.

4. Click on the Download Export File button. (A .xml file will be downloaded.)

Installing the Required Drupal Modules

1. Log in to the dashboard of your Drupal 8 website.

2. Click on the Extend tab at the top menu.

3. The Extend page will appear. Scroll down to the Migration section.

Drupal 8 Extend Migration section

4. Tick the checkbox for Migrate.

5. Click on the Install button.

6. Install the other required modules:

Refer to the tutorial How to Install a Module in Drupal 8.

7. Tick the checkboxes for the following on the Extend page:

  • Migrate Plus
  • Migrate Tools
  • WordPress Migration Support
  • WordPress Migration UI
  • Chaos Tools

8. Don’t forget to click on the Install button.

Importing Contents to Drupal

1. Go to Structure > Migrations.

2. The Migrations page will appear. Click on the Add import from WordPress button.

Drupal Structure > Migrations page

3. The Data source page will appear. Below WordPress exported file (WXR), click on the Browse button and look for the .xml file that you exported from your WordPress website.

Drupal Structure Migrations Data source page

4. Click on the Next button.

5. The Authors page will appear. You will be asked this question: Create new users for existing WordPress content authors?

6. Choose either Yes or No.

Drupal Structure Migrations Authors page

Drupal Structure Migrations Authors page

7. Click on the Next button.

8. The Vocabularies page will appear. You will be shown these messages: Import WordPress tags as and Import WordPress categories as.

Drupal > Structure Migrations Vocabularies page

9. You will be given these choices for each of those: Do not import or Tags.

We suggest you choose Tags for both of those.

10. Click on the Next button.

11. The Content page will appear. You will be shown these messages: Import WordPress blog posts as and Import WordPress pages as.

Drupal > Structure Migrations Content

12. You will be given these choices for each of those: Do not import, Article, Basic page.

We suggest you choose Article for Import WordPress blog posts as and Basic page for Import WordPress pages as.

13. Click on the Next button.

14. The page for Posts will appear. You will be shown this message: Default format for text fields.

Drupal > Structure Migrations Posts

15. You will be given these choices: Basic HTML, Restricted HTML, Full HTML, Plain text.

We suggest you choose Full HTML to preserve all your HTML code.

16. Click on the Next button.

17. The page for Pages will appear. You will be shown this message: Default format for text fields.

Drupal > Structure Migrations Pages

18. You will be given these choices: Basic HTML, Restricted HTML, Full HTML, Plain text.

We suggest you choose Full HTML to preserve all your HTML code.

19. Click on the Next button.

20. The Review page will appear. You will be shown these messages: ID to assign to the generated migration group and ID to prepend to each generated migration.

Drupal > Structure Migrations Review

You can leave the defaults as they are, if you want to.

21. Click on the Finish button.

22. The Migrations page will appear. Listed in the first column (Migration) are the content types that you can import. The last column (Operations) has an Execute button for each of the content types. Click on the Execute button for each content type that you want to import into your Drupal website. We suggest that you open a new browser tab/window for each Execute button.

Drupal > Structure Migrations

23. After clicking the Execute button for a content type, the Execute migration page for that content type will appear.

In Operation, you will be given these choices: Import, Rollback, Stop, Reset.

Drupal > Structure Migrations Execute Migration

Choose Import.

24. Click on the Execute button and wait for the migration to finish.

25. When you are finished with all content types that you want to import or migrate, go to Structure > Migrations and check the first column (Migration Group) if it includes what you have just migrated.