Yes, you can easily migrate your existing users from Drupal to another platform like WordPress. As most things with Drupal, there are numerous ways of approaching, and all depend on your version and somewhat on the actual development of your website.
So, consider several of these options, and perhaps see which methods might be best for your specific situation. Be mindful that methods for Drupal 7 may not be applicable to Drupal 8 or even Drupal 9.
Several methods for exporting Drupal users
No matter which Drupal version your website is built on, there’s certainly a method for migrating your website’s user data out of the Drupal database. Let’s explore several popular methods for exporting Drupal users and touch on some ideas for getting the resulting data into WordPress.
Some of the most popular methods our migrating engineers mentioned:
Using the User Export Module
Export a CSV file of Drupal users to WordPress
The first step is installing and enabling the User Export Module on your existing Drupal installation. This module provides an interface where you can select which fields of information will be included in each user’s exported record, as well as giving options for how they want their exported records formatted (e.g., tab delimited, comma separated values). Once these settings are set up correctly, simply click ‘Export’ at the bottom of this page to create and download a CSV file containing the user data.
A CSV file is ideal for importing into other CMS platforms. You can then use this CSV file in conjunction with a plugin such as WP All Import or the native WordPress import tool to import the user data into your new WordPress website.
Exporting Users with Drush Commands
This is probably the most direct approach you can take when it comes to migrating users between two platforms. The only reason we’re not suggesting this method more often is because so many Drupal websites are on older versions, and the commands and general capability may not be there at all.
General outline of Drush export method:
- Verify Drush capabilities
- Install appropiate modules for exporting
- Run commands to generate Drupal user export index/array
- Export users as needed in required data format
First, you will need to install the following module in your Drupal site before attempting to export users: Drush User Export (drushexport). This module requires Drush 7 or later.
After installation of the drushexport module has been completed successfully, open up your console/terminal window and navigate into our Drupal root directory where ‘drush’ is located (or make sure it’s in your PATH), then run this command:
$ drush uex [options] # filename not necessary when using --stdout option # eg $ drush uex --format=csv | head -n5 >users.csv
NOTE: Be absolutely sure you are working in a backup or staging/development server when doing this. Doing this incorrectly could completely destroy your website, so if you’re not confident with Drush, command line programming, or don’t know what a staging/backup server is, PLEASE STOP IMMIDIATELY and seek professional assistance.
You can then use the –stdout option to print out user data as a CSV file in stdout instead of writing it directly to a file:
$ drush uex --format=csv --stdout >users.csv # To export all users as csv, direct output into 'users.csv' #
Note: you could also use any other format such as json or yml
Utilize a Migration Service Company
Another popular option is to use a specialized Drupal to WordPress migration company for handling user database transfers. There are several companies out there that provide these services and will generally require access to both the Drupal account as well as the WordPress.
These services would take care of the entire transition for you, and typically don’t necessitate any technical knowledge on your part.
Your organization would, of course, need an appropriate budget for this method. Migration projects can be costly, depending on the complexity of your website, with costs of migrating often outpacing new development costs.
Advantages to outsourcing this project:
- Reduce or mitigate risks associated with migrations
- Minimize downtime
- Limit technical requirements of the team
- Faster results
- Access to expert engineering talent
Companies provide technical user migration solutions, allowing you to transfer your existing Drupal users over into WordPress quickly and easily without having to worry about setting up any of the tedious implementation described here.
For your organization, this might be right, especially if you do not have the technical knowledge or resources to perform a manual migration in-house. Costs of migration, of course, will vary greatly depending on the size and complexity of your organization’s website. For many organizations, consulting with an expert will be worth considering, even if only for the support in mapping out a content migration plan for your website.
Migrate Drupal User Database Tables Manually
Though time-consuming, and somewhat technical, manual database migration does not require any additional tools, plugins or modules. To do this, you will only need access to both your Drupal and WordPress databases via phpMyAdmin (or whatever tool you use).
This method involves creating a backup of each user table in the Drupal database which contains all users currently registered on your website, then using an import query (or series of queries) in MySQL that are able to add these users into the new WordPress system automatically while ensuring proper data formatting between each platform so information displays correctly once imported into the new environment.
Outline of steps to do this manually:
- Export user table from Drupal
- Map the field columns between both systems
- Import User Table into WordPress
This method, depending on how your website utilizes users, can involve setting up source/destination mapping rules within certain scripts, as well as scripting specific routine events such as password hashing, or any number of things used by your organization’s website.
Import/Export Plugins and Other Tools
There are numerous plugins out there that can be used to simplify the process of migrating existing users from Drupal into WordPress, though not all may be compatible with your version and utilization of each CMS. Plugins like WP User Manager, Migrate Users & Groups and WP All Import are some popular options – but do give a look around for other solutions as well.
In addition to these tools, you might have success using Drush or maybe considering outsourcing the whole thing and forget about it.
Regardless of which option you choose (or even if you decide upon another solution not listed here), make sure that whoever is responsible for this task has enough background knowledge on working with databases so they can easily troubleshoot anything unexpected during the migration process.