Drupal, General, Technology, Tutorials

Guide On How To Migrate From WordPress To Drupal 8 Easily

February 14, 2018

Introduction

In this tutorial, I will show you how to migrate from WordPress to Drupal 8 easily. This guide will walk you through the required steps to ensure that your transition from WordPress to Drupal CMS goes smoothly.

There are good reasons for migrating to Drupal 8. Drupal has enterprise-grade security and great scalability especially for webmasters that want to build large sites.

Let’s begin.

1. Export a WXR file From Your WordPress Admin Panel

To successfully migrate to Drupal from WordPress, we will first have to export the WXR file from our existing WordPress site.

Go to your existing WordPress admin panel (wp-admin) and go to the section titled “Tools“.

Under “Tools“, click “Export“.

Under “Choose what to export“, you can either choose “All content” or “Posts” & “Pages

Note: Drupal 8 does not accept XML files that exceed 2MB. If you choose the “All content” option, your XML file may exceed the limit which depends on various factors such as the number of plugins installed that have may require additional resources for exporting. For example, a 5MB XML file will be rejected, and the WordPress migration would fail. Therefore, you could separately export the relevant content such as “Posts” & “Pages“. You would then download two XML files separately.

After you’ve clicked the “Download Export File“, WordPress will begin to create an XML file which will be saved to your computer for later use with your Drupal 8 web application.

2. Create/Login To Your Drupal Web Application

You can go ahead and create a new Drupal 8.0 web application on your server and log in to your Drupal admin account.

If you are planning a fresh installation, pick the very latest version from the official Drupal website: https://www.drupal.org/download. For example, if the latest version is Drupal 8.3, pick that over Drupal 8.2.

The default Drupal 8 user login path is: http://yoursite/user/login

 

3. After Logging In, Click On “Extend” Under The Drupal Admin Menu

Once you have successfully logged into your Drupal admin account, click on the “Extend” area located under the Admin menu.

The “Extend” area permits admins to install and disable new modules.

Scroll down the “Extend” area until you see the “CORE (EXPERIMENTAL)” section.

Enable the installation of the “Migrate” module by ticking the box. This module essentially handles the migrations.

Remember to scroll all the way down and click on the blue button labelled “Install“.

You will be shown a message “Are you sure you wish to enable experimental modules?“. Click “Continue“.

If the installation was successful, you’d see the message: “Module Migrate has been enabled.

4. Download And Install The WordPress Migrate Module From The Official Drupal Website

We are going to need to install the WordPress Migrate Module on our Drupal site which allows the importing of WordPress blog exports into Drupal 8.

To download the WordPress Migrate Module: go to https://www.drupal.org/project/wordpress_migrate

As of now, we can see that “The Drupal 8 version is under development in the 8.x-3.x branch” under “Status“.

Scroll down a bit until we see the “Downloads” section.

Download the module in “tar.gz” format for Drupal “8.x” versions, particularly the version “Recommended by the project’s maintainer.

After you have successfully downloaded the module to your computer, go back to the “Extend” area in your Drupal Admin menu.

Click on the blue button labelled “Install new module“.

Upload the WordPress Migrate Module to install. In our case, it is “wordpress_migrate-8.x-3.0-alpha2.tar” Thus, “Choose File“.

Click on the blue button “Install“.

You will wait a few seconds while the Module is installing. If the module has been successfully installed, you’ll see the following box messages: “Installation was completed successfully.” & “Installed wordpress_migrate successfully“.

To successfully activate/install the WordPress migration support module & WordPress Migration UI module, we will need to install the following modules which are missing by default:

  • Migrate Plus (Migrate_plus)
  • Chaos tool suite (Ctools)
  • Migrate Tools (Migrate_tools)

5. Download And Install The Migrate Plus Module From The Official Drupal Website

Download the Migrate Plus Module from the official Drupal site: https://www.drupal.org/project/migrate_plus

Scroll down all the way to the bottom of the web page until you see the “Downloads” section.

Download the module in “tar.gz” format for Drupal “8.x” “beta2” versions, particularly the version “Recommended by the project’s maintainer.

After you have successfully downloaded the module to your computer, go back to the “Extend” area in your Drupal Admin menu as you have done for the previous module.

Click on the blue button labelled “Install new module“.

Upload the Migrate Plus Module to install. In our case, it is “migrate_plus-8.x-4.0-beta2.tar.gz” Thus, “Choose File“.

Click on the blue button “Install“.

Like previously, you’ll have to wait a few seconds while the Module is installing. If the module has been successfully installed, you’ll see the following box message: “Installation was completed successfully.”

6. Download And Install The Chaos Tool Suite Module From The Official Drupal Website

Now download the Chaos tool suite Module from the official Drupal site: https://www.drupal.org/project/ctools

Scroll down a bit until we see the “Downloads” section.

Download the module in “tar.gz” format for Drupal “8.x” versions, particularly the version “Recommended by the project’s maintainer.

After you have successfully downloaded the module to your computer, go back to the “Extend” area in your Drupal Admin menu as you have done for the previous module.

Click on the blue button labelled “Install new module“.

Upload the Chaos tool suite Module to install. In our case, it is “ctools-8.x-3.0.tar.gz” Thus, “Choose File“.

Click on the blue button “Install“.

Like previously, you’ll have to wait a few seconds while the Module is installing. If the module has been successfully installed, you’ll see the following box message: “Installation was completed successfully.”

7. Download And Install The Migrate Tools Module From The Official Drupal Website

Now download the Migrate Tools Module from the official Drupal site: https://www.drupal.org/project/migrate_tools

Download the module in “tar.gz” format for Drupal “8.x” “beta2” versions, particularly the version “Recommended by the project’s maintainer.

After you have successfully downloaded the module to your computer, go back to the “Extend” area in your Drupal Admin menu as you have done for the previous module.

Click on the blue button labelled “Install new module“.

Upload the Migrate Tools Module to install. In our case, it is “migrate_tools-8.x-4.0-beta2.tar.gz” Thus, “Choose File“.

Like previously, you’ll have to wait a few seconds while the Module is installing. If the module has been successfully installed, you’ll see the following box message: “Installation was completed successfully.”

Click on the blue button “Install“.

8. Activate/Install Chaos Tool Suite Module

Let’s go back to the “Extend” area in your Drupal Admin menu like you have done so previously.

Scroll down until you see the “CHAOS TOOL SUITE” section.

Enable the installation of the “Chaos tool” module by ticking the box.

Remember to scroll all the way down and click on the blue button labelled “Install“.

If the installation was successful, you’d see the message that the module has been successfully enabled as you saw earlier for the preceding module.

8. Activate/Install Migrate Plus, Migrate Tools, WordPress Migration Support, & WordPress Migration UI

Let’s go back to the “Extend” area in your Drupal Admin menu again.

Scroll down until you see the “Migration” section.

Enable the installations of the “Migrate Plus“, “Migrate Tools“, “WordPress Migration Support“, & WordPress Migration UI modules by ticking the boxes.

 

Remember to scroll all the way down and click on the blue button labelled “Install“.

If the installations were successful, you’d see the message that the 4 modules have been successfully enabled as you saw earlier for the preceding module.

9. Starting WordPress Migrations From Drupal Admin Menu

Since we have now successfully installed and enabled all the required modules, we can go ahead and start our WordPress migration processes.

To begin, click on the “Structure” area located under the Admin menu.

Click on “Migrations” under the “Structure” area.  “Migrations” section permits admins to manage migration processes.

 

Click on the blue button labelled “Add import from WordPress“.

Under “WordPress exported file (WXR)“, click on the button “Choose File” and choose the XML file/files you have exported earlier from your WordPress blog.

Click on the blue button labelled “Next”.

Note: Remember that Drupal 8 does not accept XML files that exceed 2MB. If you separately exported the relevant content such as “Posts” & “Pages” earlier, then you would have two XML files. In this case, you will have to import them into Drupal 8 separately using the same process above.

You will be shown the following message: “Create new users for existing WordPress content authors?

Choose either “Yes” or “No“.

Click on the blue button labelled “Next”.

We have the option of whether to “Import WordPress tags as” and “Import WordPress categories as“. You can choose from the dropbox for each either “Do not import” or “Tags“. If you don’t like what you see after the migration, you could always revert the changes by redoing the migration completely from the beginning. Hence, you could erase all of this.

Click on the blue button labelled “Next”.

We have the option of whether to “Import WordPress blog posts as” and “Import WordPress pages as“. You can choose from the dropbox for each either “Do not import“, “Article“, or “Basic page“.

I suggest you pick “Article” for “Import WordPress blog posts as” and “Basic page” for “Import WordPress pages as“.

Click on the blue button labelled “Next”.

We have the option of choosing the “Default format for text fields” for “Posts“. You can choose from the dropbox one of the following: “Basic HTML“, “Restricted HTML“, “Full HTML“, or “Plain text“.

Remember if the changes don’t correctly display or you are simply unsatisfied with the results, you could always revert back these changes.

Click on the blue button labelled “Next”.

We also have the option of choosing the “Default format for text fields” for “Pages“. You can choose from the dropbox one of the following: “Basic HTML“, “Restricted HTML“, “Full HTML“, or “Plain text“.

Remember if the changes don’t correctly display or you are simply unsatisfied with the results, you could always revert back these changes.

Click on the blue button labelled “Next”.

Finally, we must enter the “ID to assign to the generated migration group” in the box.

We must also enter the “ID to prepend to each generated migration” in the box.

Click on the blue button labelled “Finish”.

After the process has finished, we will be brought to the “Migrations” area.

We have to import comments and the content separately now. Click on “Execute” for the comments and content you want to import to your Drupal 8 site.

We have the option of “Choose an operation to run” for “Execute migration“. There are various choices from dropbox, particularly the following: “Import“, “Rollback“, “Stop“, or “Reset“.

Go ahead and pick “Import“.

Click on the button “Execute“.

Wait for a little bit while the migration is in progress.

When the migration is complete, we will see “Processed items“.

If you see that 1 item failed, that is fine. You may have a duplicate page which you can delete.

Repeat the same process as above for the other content you would like to migrate.

If you ever want to revert the changes for any of the migrations, choose the option “Rollback” from “Choose an operation to run” for “Execute migration“.

If the migration process gets stuck and does not import anything after clicking “Execute“, choose the option “Reset” from “Choose an operation to run” for “Execute migration“.

To confirm that the items were imported successfully, go back and click on “Migrations” under the “Structure” area.

Click on “List migrations” for your migration group. If you import more than one XML file, you will see a separate migration group.

Note: If you ever want to delete a migration group after rolling back, simply click on the arrow button next to “List migrations“. You will be shown two options: “Edit” and “Delete“.

Click “Delete.

 

You will see the question: “Are you sure you want to delete migration group Imports from WordPress site?

Click the blue button labelled “Delete Migration Group“.

You will see the number of successfully imported items.

All done.

Conclusion

Remember that Drupal takes more time to learn than WordPress. Therefore, make sure to give yourself time to learn Drupal.

Enjoy your new Drupal 8 CMS.

You Might Also Like

Back to top
%d bloggers like this: