WordPress is perhaps the most popular CMS for all web based projects. According to many authorities, WordPress powers a significant portion of websites on the internet. WordPress is ideally suited for a wide range of projects from a simple blog to a highly functional ecommerce store.
Despite the benefits of WordPress, security is one area where WordPress still face several challenges from other CMS. Given the importance of security in the modern world, many developers and clients now look toward Drupal, a popular CMS that is well known for its security related features. Because of the security-first paradigm of Drupal, websites that require strict security are often implemented in Drupal.
The good news is that migration of a WordPress website to Drupal is an easy enough process that comprises of several stages. Let’s start!
Very Important: Before starting the process, make sure to backup your WordPress website and save the file(s) at a secure location. In the event of a disaster, this backup is invaluable for restoring the website.
Export WordPress Website
In your WordPress Admin Area, go to Tools > Export. Select All content and then click the Download Export File button.
Validate The XML File
Next, validate the downloaded XML file. This is an important step because the migration process requires a valid XML file.
If you are on a Mac, you can use the preinstalled xmllint command line utility. Open the terminal and type xmllint yourfilename.xml (Replace yourfilename.xml with the name of the XML file you downloaded). Fix all the errors that show up. Once done, check the file once again to make sure that the XML file completely errors free and ready for the next step.
If you are using Windows, you can use any online XML validation tool for validating the downloaded XML file. Make sure that you have fixed all the errors in the file.
The WordPress side of the process is now over.
Download the Required Drupal Modules
In order to start the migration process on the Drupal website, you need to download several modules to manage and streamline the process.
Migrate: This is a very useful Drupal module that allows migration of all content types.
WordPress Migrate: This module is a submodule of the Migrate module. It is developed specifically for WordPress migration without writing any code.
Pathauto: An immensely useful module, not just for migration purposes but for your Drupal website in general. This makes sure that the URL structure of the Drupal website remains clean and legible.
Migrate Extras: This module works with Pathauto (required for the module to function) in importing clean URLs.
Login to the Drupal Website
To start the Drupal side of the migration process, log in to the Drupal website and go to Find Content tab.
Click the WordPress Migration tab in the upper-right corner.
Import the XML File
Choose the Import from a file option and import the XML file downloaded from the WordPress website.
Once the upload finishes, the process of migration from WordPress to Drupal is complete. Go to the Find Content tab and check whether the data has been properly imported.
Do note that the paths of the images from the WordPress site will remain unchanged. Due to this, you might experience the issue of broken images. To fix this, you must find and replace the paths properly in the XML file before importing it into Drupal.
Migrating from WordPress to Drupal is quite easy and does not really require extensive technical know-how. Remember that the success of the entire migration depends heavily on the degree of errors in the XML file.
Manual migration is safe but slow. Could an automated transfer be considered as a worthy alternative? Of course, it can. With aisite you might get both – speed and quality.
If you would like to add to the conversation or have a query about the topic, please leave a comment below.