With Drupal 6 past expiration, so to speak, and Drupal 7 reaching its end of support in November of 2023, many organizations are left wondering what to do with their aging Drupal website.
Drupal provides a few options for exporting content from websites.
There are two common methods of exporting your site data, either for transfer to another platform or when migrating your Drupal site around to different servers. It’s important that you understand these two different methods before attempting any export – as selecting the wrong one could cause serious problems when importing into a new environment.
Note: A lot of what you can do with Drupal depends on the version of Drupal your website is on. We know there are many organizations who have not maintained older Drupal websites and that many of the features we’re talking about may not be available to you.
The best method for exporting content in Drupal 8
Drupal provides a few options for exporting content, but if your Drupal site is running Drupal 8, then we recommend using the Drupal 8 core module called the ‘Migrate’ module, which is easy to use and can be used to move content from one environment to another quickly and easily.
Some users have reported that the Migrate module is not installed on their Drupal site, if that’s the case for you, please note you will need to install it first.
The Migrate Module allows you to export your site’s data into an XML or CSV format so that it can be imported into another Drupal website, or manipulated however necessary.
Steps for using the Migrate module:
- Install Migrate Module
- Configure Migrate Module
- Run Command to Execute Migration Process
The Migrate feature of this module also supports batch exports, allowing you to export multiple types of content in one go, rather than having them exported separately each time. It also has advanced features such as filtering by date range or type so that only specific pieces of data are exported at once.
Using this method is simple – just install the free Backup and Migrate module on your Drupal website (note: some hosting companies are already running this for their customers) and then navigate to Configuration > Development > Backup & Migrate in order to begin creating your backup file.
Clicking the “Create new backup” button will start a process that takes all your site’s data (including nodes, blocks, taxonomy terms etc.) into an archive which can then be imported into another platform or server with ease.
Best practices for exporting content from Drupal 7 websites
If you are working with a Drupal 7 website, it is important to understand that the Backup and Migrate module is probably not available to you. The best approach for exporting content from a Drupal 7 website is to use the core Drupal Features module which can be easily installed via the admin interface. This will enable you to create a configurable “feature” of your site (such as nodes, views, blocks etc.) that you can then export into an archive file. You can then import this feature back into another platform or server if needed – making this one of the most efficient ways for transferring content between websites.
It’s also worth noting that with both Backup & Migrate and Features modules – you are able to selectively choose what parts of your site will be included in the export/import process, affording your team greater control over how their data transfer takes place while still allowing them all the flexibility they need when it comes time migrate their websites around!
Other options for exporting Drupal content
The other method of exporting content in Drupal is using Drush (the command line interface). It can be used to quickly export data as well as set up complex migrations with Drupal’s migration framework. It’s a great tool but requires more experience with coding than migrate module does – so if you’re not confident in your coding abilities, it may not be right for you.
Exporting content from Drupal websites is simple thanks to core modules such as Backup & Migrate (for Drupal 8) or those like Feature (for Drupal 7). These modules provide an easy way for users and developers alike to backup their sites’ data in an archive file which they may use later when migrating or transferring it onto another domain/server.
Exporting Drupal content to JSON
In addition to creating backups, you can also export content in the form of JSON files. Drupal 8’s core content API allows you to export any type of entity directly as a JSON file – which can then be used elsewhere or imported into another system. This is done by navigating to Configuration > Advanced Content > Content Types and selecting the Export tab at the top right corner of your screen.
From here, you’ll need to select what types of entities (nodes, blocks etc.) should be included in your export and then click “Export”. Once complete, all these entities will be packaged up into a single JSON file that can then be used for transfer elsewhere, or importing onto another platform (or Drupal website).
Another approach to exporting Drupal content, if JSON is the preferred data format, would be by setting up an endpoint in Drupal. This method allows you to export the data of your website as JSON, which can then be read by other applications or platforms.
In order to do this, you will need to create a custom module that sets up an endpoint and provides content in an easily readable format (note: creating custom modules requires advanced knowledge of Drupal). Once created, you can access the exported data by simply visiting the designated URL for your endpoint – making it easy for other applications to consume and import into their own systems.
Exporting Drupal content to CSV
If you need your content from Drupal in a CSV format, you may want to try to use the Views Data Export module. This module provides an interface for creating views that output data as CSV or XML – allowing you to easily export content from Drupal in a structured format.
The Views Data Export module is easy to setup and use – just create a view as normal, add any filtering options as needed, and then switch the “Format” option to be “Data export”. This will give you the ability to specify which fields should be included in your exported file and then generate it for download.
Alternative CSV export method in Drupal
If you don’t want to use a module, you can also export content from Drupal directly as CSV using the command-line tool Drush. By entering a few commands at the command line, it’s possible to generate CSVs containing all of your nodes and other content. For more information on how to do this, please refer to the official Drush documentation.
Exporting data for migrations using the Drupal Migrate API
If you’re migrating from an old version of Drupal to a new version, the Migrate API can make this process much easier. This API allows developers to create custom migration scripts that map legacy data into a new structures, making it easy to move content between different versions of Drupal and even other platforms.
The Migrate API, while it sounds like it could be useful, it is more geared towards migrating or upgrading your Drupal website from 6/7 to Drupal 8.
The Migrate API is quite complex as it requires advanced knowledge of programming – so if your team needs help with this we recommend hiring an experienced developer who specializes in migrations.
Optimizing your Drupal site post-migration
Once you’ve migrated your content from one server to another, it’s a good idea to optimize your Drupal website performance for the new environment. There are lots of tools available that can help with this, such as caching technologies and performance optimization modules.
Using these tools can make having an efficient Drupal website much easier and will ensure the best possible experience for your users.
Next steps for migrating your Drupal website
Before starting any content migration, it’s important to understand the process and properly plan your website migration. If you need assistance with moving your Drupal website around or would like some advice on how to best migrate content, our team at BIG can help.
We offer complete solutions for migrating websites into Drupal or away from other platforms – so get in touch today and find out how we can help make your migration a success.
We’re the leading company for migrating Drupal to WordPress. We’ve migrating websites for national government departments (.gov), Fortune 1000 companies (.com), Ivy league Universities (.edu), and large e-commerce companies. Our dedicated engineers are experts in migrating data and maintaining the highest level of security throughout the process.