FG Drupal to WordPress


This plugin migrates articles, stories, pages, categories, tags and images from Drupal to WordPress.

It has been tested with Drupal 4, 5, 6, 7, 8, 9 & 10 and the latest version of WordPress. It is compatible with multisite installations.

Major features include:

  • migrates the Drupal articles
  • migrates the Drupal 6 stories
  • migrates the Drupal basic pages
  • migrates the Drupal categories
  • migrates the Drupal tags
  • migrates the Drupal images
  • uploads all the posts media in WP uploads directories
  • uploads external media (option)
  • modifies the post content to keep the media links
  • resizes images according to the sizes defined in WP
  • defines the featured image to be the first post image (option)
  • keeps the alt image attribute
  • modifies the internal links
  • compatible with the MySQL, PostgreSQL and SQLite Drupal database drivers

No need to subscribe to an external web site.

Premium version

The Premium version includes these extra features:

  • migrates the comments
  • migrates the authors
  • migrates the administrators
  • migrates the users
  • migrates the custom post types
  • migrates the custom taxonomies
  • migrates the custom fields
  • migrates the custom users fields
  • migrates the users pictures
  • migrates the navigation menus
  • migrates the blocks as inactive widgets
  • authenticates the users with their Drupal passwords
  • SEO: redirects the Drupal URLs to the corresponding WordPress URLs
  • ability to not import some data
  • ability to import only specific node types
  • imports and replaces the Image Assist shortcodes
  • imports the images managed by the Image Attach Drupal module
  • imports the nodes relationships
  • imports the Drupal 8 Media entities
  • imports the Drupal Media
  • imports the Video Embed fields
  • ability to run the import by WP CLI

The Premium version can be purchased on: https://www.fredericgilles.net/fg-drupal-to-wordpress/


The Premium version allows the use of add-ons that enhance functionality:

  • CCK Custom Content Kit
  • ECK Entity Construction Kit
  • Meta tags
  • Location custom fields
  • Ubercart store
  • Drupal Commerce store
  • Name custom fields
  • Addressfield custom fields
  • Internationalization
  • NodeBlock fields
  • EntityReference relationships
  • Media Provider (S3, SoundCloud, YouTube media)
  • Forum
  • Field collections
  • Multifield
  • Paragraphs
  • Domain Access
  • Countries
  • Profile2 user fields
  • Entity Embed
  • Webform
  • Book

These modules can be purchased on: https://www.fredericgilles.net/fg-drupal-to-wordpress/add-ons/


  • English (default)
  • French (fr_FR)
  • other can be translated


  • Parameters screen


  1. Install the plugin in the Admin => Plugins menu => Add New => Upload => Select the zip file => Install Now
  2. Activate the plugin in the Admin => Plugins menu
  3. Run the importer in Tools > Import > Drupal
  4. Configure the plugin settings. You can find the Drupal database parameters in the Drupal file sites/default/settings.php


I get the message: «[fg-drupal-to-wp] Couldn’t connect to the Drupal database. Please check your parameters. And be sure the WordPress server can access the Drupal database. SQLSTATE[28000] [1045] Access denied for user ‘xxx’@’localhost’ (using password: YES)»

  • First verify your login and password to the Drupal database.
    If Drupal and WordPress are not installed on the same host:
  • If you use CPanel on the Drupal server, a solution is to allow a remote MySQL connection.
    • go into the Cpanel of the Drupal server
    • go down to Database section and click «Remote MySQL»
    • There you can add an access host (WordPress host). Enter the access host as the SOME-WEBSITE-DOMAIN-OR-IP-ADDRESS and click add host.
  • Another solution is to copy the Drupal database on the WordPress database:
    • export the Drupal database to a SQL file (with phpMyAdmin for example)
    • import this SQL file on the same database as WordPress
    • run the migration by using WordPress database credentials (host, user, password, database) instead of the Drupal ones in the plugin settings.

I get this error when testing the connection: «SQLSTATE[HY000] [2002] Connection refused» or «SQLSTATE[HY000] [2002] No such file or directory»

  • This error happens when the host is set like localhost:/tmp/mysql5d.sock
    Instead, you must set the host to be localhost;unix_socket=/tmp/mysql5d.sock

The migration stops and I get the message: «Fatal error: Allowed memory size of XXXXXX bytes exhausted» or I get the message: “Internal server error»

  • First, deactivate all the WordPress plugins except the ones used for the migration
  • You can run the migration again. It will continue where it stopped.
  • You can add: define('WP_MEMORY_LIMIT', '512M'); in your wp-config.php file to increase the memory allowed by WordPress
  • You can also increase the memory limit in php.ini if you have write access to this file (ie: memory_limit = 1G). See the increase memory limit procedure.

The media are not imported

  • Check the URL field that you filled in the plugin settings. It must be your Drupal home page URL and must start with http:// or https://

The media are not imported and I get the error message: «Warning: copy() [function.copy]: URL file-access is disabled in the server configuration»

  • The PHP directive «Allow URL fopen» must be turned on in php.ini to copy the medias. If your remote host doesn’t allow this directive, you will have to do the migration on localhost.

I get the message: «Fatal error: Class ‘PDO’ not found»

  • PDO and PDO_MySQL libraries are needed. You must enable them in php.ini on the WordPress host.
    Or on Ubuntu:
    sudo php5enmod pdo
    sudo service apache2 reload

I get this error: PHP Fatal error: Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’

  • You have to enable PDO_MySQL in php.ini on the WordPress host. That means uncomment the line extension=pdo_mysql.so in php.ini

Does the migration process modify the Drupal site it migrates from?

  • No, it only reads the Drupal database.

I get this error: Erreur !: SQLSTATE[HY000] [1193] Unknown system variable ‘NAMES’

  • It comes from MySQL 4.0. It will work if you move your database to MySQL 5.0 before running the migration.

I get this error «Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM»

  • You must use at least PHP 5.3 on your WordPress site.

I get this error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

  • It is a compatibility issue with your version of MySQL.
    You can read this post to fix it: http://forumsarchive.laravel.io/viewtopic.php?id=8667

None image get transferred into the WordPress uploads folder. I’m using Xampp on Windows.

  • Xampp puts the htdocs in the applications folder which is write protected. You need to move the htdocs to a writeable folder.

Do I need to keep the plugin activated after the migration?

  • No, you can deactivate or even uninstall the plugin after the migration (for the free version only).

My screen hangs because of a lot of errors in the log window

  • You can stop the log auto-refresh by unselecting the log auto-refresh checkbox

Don’t hesitate to let a comment on the forum or to report bugs if you found some.


25 de agosto de 2023
This plugin does what it's advertised to do! I've used it on several sites. The premium, add-ons are often required to migrate extra types of data - but they are worth it because they work as advertised. The plugin developer responds to support requests and has released plugin updates based upon particular problems I've encountered. I highly recommend using the FG Drupal to WordPress plugin(s).
7 de julio de 2023
We are just using this plugin for a migration and 95% of the features worked fine from the beginning, the other 5% Frédéric really helped fast. In the end it worked perfect and saved a lot of time. Normally I don't like all this PRO-Plugins with many Addons, in this case I will never regret and rate with 5 stars...
30 de junio de 2023
We recently needed to migrate a large Drupal-site to WordPress, and this plugin was truly a lifesaver. Being completely inexperienced with Drupal and how data is saved there, we dreaded having to manually copy all the content, but thought we'd give this plugin a chance. Our first attempt failed, but since previous reviews mentioned how good the support was, I reached out to them and boy were they right. Responses were quick and helpful and Frederic even updated the plugins several times to account for peculiarities in the Drupal-setup. In the end we were able to migrate all the data we needed, all thanks to this plugin! 5 out of 5 stars, would definitely recommend this plugin and Frederic to anyone!
19 de junio de 2023
It really does work magic and saves tons of hours. However, something did not go completely smoothly, but with a query to the support it was possible to solve it with very good feedback.Thanks for a job well done!
26 de diciembre de 2022
Migrated a very large and very old Drupal site. If you're moving something large be sure to increase your Apache/nginx timeouts, it can take hours.
2 de diciembre de 2022
I just wanted to say that this plugin is a real time saver. We had a large Drupal resource website and using the pro plugin plus add-ons we were able to import and map the content into our new website. Frédéric and his team have been really helpful even updating the plugin to fix an issue with internal links.
Leer todas las 97 reseñas

Colaboradores y desarrolladores

«FG Drupal to WordPress» es un software de código abierto. Las siguientes personas han colaborado con este plugin.


Traduce «FG Drupal to WordPress» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios


  • New: Import the «image» post type as attachment
  • New: Import the duplicate taxonomy terms


  • Update the Help screen


  • Tested with Drupal 10
  • Tested with WordPress 6.4.1


  • Tested with WordPress 6.4


  • Tested with WordPress 6.3.2


  • Fixed: TXT and PPS files were not imported
  • Tested with WordPress 6.3.1


  • New: Check if we need the Book add-on
  • Tested with WordPress 6.3


  • Fixed: «Type» and «terms» are reserved words for taxonomies


  • New: Check if we need the Multifield add-on


  • New: Add many hooks
  • Fixed: FTP connection failed with password containing special characters
  • Tested with WordPress 6.2.2


  • Fixed: Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given


  • Fixed: Notice: Function register_taxonomy was called incorrectly. The «content» taxonomy «name» property (content) conflicts with an existing property on the REST API Posts Controller.
  • Tested with WordPress 6.2


  • New: Import the «data-caption» image captions


  • Fixed: Filenames containing % were not imported


  • Fixed: Filenames containing & were not imported


  • New: Compatibility with PHP 8.2


  • Fixed: The option «Import the media with duplicate names» didn’t work anymore (regression from 3.44.0). So wrong images were imported.


  • Tweak: Add the parameter $taxonomy in the hook «fgd2wp_get_node_taxonomies_terms»


  • Fixed: Fatal error: Uncaught ArgumentCountError: Too few arguments to function _post_format_get_terms()
  • Tested with WordPress 6.1.1


  • Tested with WordPress 6.1


  • Tweak: Shorten the filenames if the option «Import the media with duplicate names» is selected
  • Fixed: Some posts had a wrong slug
  • Tested with WordPress 6.0.3


  • New: Add the functions «get_wp_post_ids_from_meta» and «get_wp_term_ids_from_meta»


  • Tested with WordPress 6.0.2


  • Fixed: With PostgreSQL: Warning: unserialize() expects parameter 1 to be string, resource given


  • New: Add the hook «fgd2wp_map_taxonomy»


  • New: Import the image «title» field of the featured images as image caption
  • Tested with WordPress 6.0.1


  • New: Check if we need the ECK add-on


  • Fixed: Page 404 for the posts of type «author»
  • Tweak: Rename the hook «fgd2wp_convert_node_type» to «fgd2wp_map_post_type»


  • Tested with WordPress 6.0


  • New: Add the «language» argument in the function get_node_slug()


  • New: Add the WordPress path in the Debug Info
  • Fixed: the Private key file field was displayed even when FTP is not chosen


  • New: Connection through SFTP using a private key
  • Tested with WordPress 5.9.3


  • Fixed: Missing parent category


  • New: Check if we need the Webform add-on


  • New: Import the audio files in the post content


  • Tweak: Add the function get_post_meta_like()


  • Tweak: Refactor the JavaScript


  • Tested with WordPress 5.9.2


  • Fixed: Don’t check if the CCK add-on is required on Drupal 7


  • New: Don’t delete the theme’s customizations (WP 5.9) when removing all WordPress content
  • Tested with WordPress 5.9


  • New: Add the hook «fgd2wp_get_featured_image»
  • Tested with WordPress 5.8.3


  • Tested with WordPress 5.8.2


  • Fixed: «[ERROR] Not a media» for HTML links


  • New: Import the «post» post types
  • Tested with WordPress 5.8.1


  • Fixed: Images surrounded with a link were not imported in the content


  • New: Add a spinner during the AJAX actions


  • Fixed: Some variables were not escaped before displaying


  • Fixed: Wrong plural terms
  • Tested with WordPress 5.8


  • New: Display the reference of the Drupal entity when a media can’t be downloaded


  • New: Add the hook «fgd2wp_modify_links_in_content»


  • Fixed: Images containing spaces were not replaced in the post content


  • New: Add the hook «fgd2wp_set_plugin_options»
  • Tweak: Refactoring


  • New: Add the «map_taxonomy» function
  • New: Add the «fgd2wp_pre_dispatch» hook
  • Tweak: Rename «convert_node_type» by «map_post_type»


  • New: Log a message during internal links modification
  • Tested with WordPress 5.7.2


  • New: Check if we need the Geodata add-on
  • Tested with WordPress 5.7.1


  • Fixed: Media containing % were not imported
  • Fixed: The Metatag add-on warning was not displayed for Drupal 8 databases


  • Tested with WordPress 5.7


  • Tweak: Remove the «wp_insert_post» that consumes a lot of CPU and memory


  • New: Make the plugin more generic to be able to import the data that are not in the «node» table
  • Tested with WordPress 5.6.2


  • Tested with WordPress 5.6.1


  • Fixed: Wrong version of Drupal guessed when taxonomies are not set


  • Fixed: «Warning: unserialize() expects parameter 1 to be string, resource given» with PostgreSQL database


  • Fixed: Media with space not imported


  • Fixed: Issue with numeric only taxonomy slugs
  • Fixed: Counter doesn’t reach 100% with Drupal 8


  • New: Get the post slug from the URL alias


  • New: Ability to download the media by http, ftp or file system
  • Fixed: Images inserted in the post content with width and height = 0 when the option «Don’t generate the thumbnails» is selected


  • New: Add documentation about WP CLI
  • Fixed: Plugin and add-ons not displayed in the debug informations on Windows


  • Tested with WordPress 5.6


  • Fixed: JQuery Migrate warning: jQuery.fn.load() is deprecated


  • Fixed: Character » not displayed in the settings


  • New: Ability to change the default import timeout by adding define('IMPORT_TIMEOUT', 7200); in the wp-config.php file


  • Tested with WordPress 5.5.3


  • New: Check if we need the Profile2 add-on
  • Fixed: Warning: max(): Array must contain at least one element
  • Fixed: Progress bar at 0% if the site is in https and the WordPress general settings are in http
  • Tested with WordPress 5.5.1


  • Tweak: Remove unused function parameter


  • Fixed: Backward compatibility with older versions of WordPress


  • Compatible with WordPress 5.5
  • Fixed: Timezone was not the same between the start and the end time in the logs


  • New: Add an option to not generate the images thumbnails
  • New: Make the max_allowed_packet human readable
  • Change: Set the media timeout to 20 seconds


  • Fixed: Body content imported in wrong language (regression from 2.13.3)


  • New: Ability to change the file paths (Drupal 8+)


  • Fixed: Files containing «&» were not imported


  • New: Check if we need the Countries add-on


  • New: Display the PHP errors in the logs
  • Fixed: [ERROR] Error:SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘stylehome.drupal_field_data_body’ doesn’t exist
  • Tested with WordPress 5.4.2


  • Fixed: Body and excerpt not imported if the body language is not equal to the node language (regression from 2.13.1)
  • Tested with WordPress 5.4.1


  • Fixed: Content imported in wrong language


  • Fixed: Notice: Array to string conversion
  • Tweak: Refactoring


  • Fixed: Logs were not displayed
  • Tested with WordPress 5.4


  • New: Add allow_url_fopen in the Debug Info
  • Fixed: Notice: Undefined index: REQUEST_SCHEME


  • New: Add the hook «fgd2wp_post_import_post»


  • Tweak: Refactor the modify links function


  • Fixed: Logs were not displayed due to mod_security


  • New: Check if the Drupal database contains Vimeo media


  • Fixed: Notice: date_default_timezone_set(): Timezone ID » is invalid


  • Fixed: Some internal links containing anchors were badly modified


  • New: Import HTML media
  • Tested with WordPress 5.3.2


  • Fixed: Nodes with an excerpt length longer than 65K were not imported
  • Tested with WordPress 5.3.1


  • New: Add an help tab
  • New: Add a debug info tab


  • New: Compatible with Drupal 4
  • Fixed: Logs were not displayed if the URL is wrong in the WordPress general settings


  • New: Download the media even if they are redirected
  • New: Check if the Drupal Commerce module is used


  • New: Add some hooks
  • Tested with WordPress 5.2.3


  • Fixed: Images duplicated in the media library
  • Fixed: The progress bar exceeds 100% with Drupal 8 multilang sites
  • Tested with WordPress 5.2.2


  • Tested with WordPress 5.2.1


  • Tested with WordPress 5.1


  • Fixed: «[ERROR] Error:SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘media_field_data’ doesn’t exist» on Drupal 7
  • Tested with WordPress 5.0.3


  • New: Check if the Paragraphs Drupal module is used


  • Fixed: Some NGINX servers were blocking the images downloads
  • Tested with WordPress 5.0.2


  • New: Compatible with Drupal 8.5 taxonomies hierarchy
  • Tested with WordPress 5.0


  • Fixed: [ERROR] Error:SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘b.body_summary’ in ‘field list’


  • New: Generate the audio and video meta data (ID3 tag, featured image)


  • New: Check if the Drupal site contains navigation menus


  • Fixed: No data was imported if the taxonomies tables don’t exist on Drupal
  • Fixed: Drupal 8 media not imported
  • Tweak: Cache some database results to increase import speed


  • Fixed: [DOM] Found 3 elements with non-unique id #fgd2wp_nonce
  • Fixed: [DOM] Found 2 elements with non-unique id #hostname


  • Tested with WordPress 4.9.8


  • Fixed: Images with absolute paths were not imported if Drupal is located on a subdirectory


  • Tested with WordPress 4.9.7


  • Change: Wording of the label «Remove only previously imported data»
  • Tested with WordPress 4.9.6


  • Fixed: Media containing «+» were not imported


  • New: Check if the Field Collection Drupal module is used


  • Fixed: The media containing attributes or anchors in their link were not imported
  • Tested with WordPress 4.9.5


  • New: Check if the Nodewords Drupal module is used
  • New: Check if the Page Title Drupal module is used


  • New: Ability to import the taxonomies by module (Drupal 6 only)


  • Tested with WordPress 4.9.4


  • Fixed: Remove default Drupal prefix
  • Tweak: Use WP_IMPORTING
  • Tested with WordPress 4.9.2


  • New: Can import the Drupal databases stored on PostgreSQL
  • Tested with WordPress 4.9.1


  • Tested with WordPress 4.9


  • Fixed: SQL error when some taxonomies contain quotes


  • Fixed: Displayed a warning about the Localization module if there were disabled languages
  • Fixed: Displayed a warning about the Nodeblock module if the Field Collection module was used without the Nodeblock module


  • New: Can import the Drupal databases stored on SQLite


  • New: Check if we need the Forum add-on
  • Tested with WordPress 4.8.3


  • Fixed: [ERROR] Error:SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘config’ doesn’t exist


  • New: Check if we need the Entity Reference add-on (Drupal 8)


  • Fixed: Wrong images imported


  • Fixed: Sanitize the file names with spaces


  • New: Keep the images alignments
  • Tested with WordPress 4.8.2


  • New: Check if we need the Media Provider add-on


  • Fixed: Avoid double slash in the media filenames
  • Tweak: code refactoring


  • New: Check if we need the Entity Reference add-on
  • Fixed: Security cross-site scripting (XSS) vulnerability in the Ajax importer
  • Tested with WordPress 4.8.1


  • New: Import the image caption in the media attachment page


  • New: Check if the NodeBlock add-on is necessary


  • New: Check if we need the CCK add-on (Drupal 5)


  • New: Modify internal links in drafts


  • New: Block the import if the URL field is empty and if the media are not skipped
  • New: Add error messages and information


  • New: Add the percentage in the progress bar
  • New: Display the progress and the log when returning to the import page
  • Change: Restyling the progress bar
  • Fixed: Typo – replace «complete» by «completed»
  • Tested with WordPress 4.8


  • Fixed: Allow media src containing extra spaces
  • Tested with Drupal 5


  • Tested with WordPress 4.7.4


  • Tweak: Add a hook


  • New: Check if we need the Internationalization module
  • Tweak: Add some hooks for internationalization
  • Fixed: Images not imported on Drupal 8
  • Tested with WordPress 4.7.3


  • New: Migrates the Drupal 6 stories


  • New: Import the images stored on Amazon S3
  • New: Check if we need the Ubercart add-on


  • Fixed: Medias that are not in the standard /sites/default/files directory were not imported
  • Fixed: [ERROR] Error:SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘field_data_field_image’ doesn’t exist
  • Tested with WordPress 4.7.2


  • Fixed: Images not imported on some servers
  • Tested with WordPress 4.7.1


  • Tweak: Code refactoring


  • New: Import the images descriptions


  • Fixed: Existing images attached to imported posts were removed when deleting the imported data
  • Tested with WordPress 4.7


  • Fixed: Images not imported if there is no node summary


  • New: Can import taxonomies terms with a same name and a different parent
  • New: Check if the Name add-on is needed
  • New: Check if the Addressfield add-on is needed
  • Tweak: Taxonomies import speed increased


  • Fixed: Wrong progress bar color


  • Fixed: Notice: register_post_type was called incorrectly. Post type names must be between 1 and 20 characters in length.
  • Tweak: Add the fgd2wp_post_save_button_click hook
  • Tweak: Add the fgd2wp_post_import_taxonomies hook


  • Fixed: The progress bar didn’t move during the first import
  • Fixed: The log window was empty during the first import


  • Tweak: Add the fgd2wp_database_connection_successful hook


  • Fixed: The «IMPORT COMPLETE» message was still displayed when the import was run again


  • Fixed: The images protected by a user agent protection were not imported


  • New: Check if the Metatag add-on is needed
  • Fixed: Database passwords containing «<» were not accepted


  • Tweak: Code refactoring


  • New: Add a hook for Drupal 6 images
  • Tweak: Code refactoring


  • Fixed: Drupal 6 custom taxonomies containing spaces were not assigned to custom post types
  • Fixed: Drupal 6 terms which taxonomy contains spaces were not imported
  • Tweak: If the import is blocked, stop sending AJAX requests


  • Fixed: Notice: Undefined index: body_summary
  • Fixed: Notice: Undefined index: body_value


  • New: Authorize the connections to Web sites that use invalid SSL certificates


  • New: Check if the CCK add-on is needed
  • New: Check if the Location add-on is needed


  • New: Modify links like /node/xx and like /taxonomy/term/xx in the posts content


  • New: Test if the Drupal database contains some URL alias


  • Fixed: Drupal 6 nodes imported with a wrong revision


  • New: Test if the Drupal database contains some custom post types and custom taxonomies


  • New: Released a Premium version which migrates the comments and the users


  • FAQ created
  • Tested with WordPress 4.6.1


  • New: Compatible with Drupal 6


  • Initial version: Import Drupal articles, basic pages, categories, tags and images