How to export my Drupal content?

Migrate to WordPress

All the data like pages, posts, users, comments and forum threads in your Drupal site is stored in a database. Therefore, getting a full copy of your Drupal data is as easy as exporting the data of its database. The export is usually a .sql (or .mysql) text file with the set of CREATE TABLE and INSERT SQL statements that would allow you to recreate the database structure and content in another site.

There are two ways of getting this export file:

  • From Outside Drupal, using any database export tool like PHPMyAdmin
  • From Within Drupal, using any of the available backup modules, e.g. Backup and Migrate

Let’s analyze both ways.

From outside Drupal using PHPMyAdmin

The free tool PHPMyAdmin is easy to use to manage MySQL databases (most likely, your Drupal is using a MySQL backend, if not check what database export tools are available for your system). You can access this tool from your control panel. Once you have gained access to the tool, select all the files of the database you need from the left column (you may have several databases installed in your site, to know which one is actually storing its content you may want to check the settings.php file, usually located in the subdirectories sites/default or /sites/default/files of your Drupal installation; look for a line like this one $db_url = ‘mysql://username:password@localhost/databasename’).

After selecting the database just go the export tab and select the tables you’d like to export.

phpmyadmin plug in

From within Drupal through Backup and Migrate Module

An alternative option is to install a backup module like Backup and Migrate. Then, you can just log in Drupal and use the module menu to select the tables to export, the destination folder for the export file and so on as shown below (your options may vary depending on the version of Drupal and the module you’re running).

drupal backup plug in

We hope you’ll find this information useful. If something is not clear or missing, please let us know and we will improve the explanation.

Posted in: Content export / import migratetowpHow to export my Drupal content?