Import content

Last updated on
21 December 2024
  1. Prepare Your CSV File:

    • Ensure your file is properly formatted and saved in UTF-8 encoding.
    • The first row of your file should contain column headers corresponding to the entity fields you want to populate (e.g., title, body, etc.).
    • Example CSV structure for importing nodes:
      
      
      title,body
      Title 1,This is the body content for the first node.
      Title 2,This is the body content for the second node.
      
  2. Access the Import Page:

    • Navigate to /admin/content/csv-importer in your Drupal site.
  3. Select Entity Type and Bundle:

    • Choose the Entity Type (e.g., "Content") and the Bundle (e.g., "Article") you want to import the content into.
  4. Set the Delimiter:

    • Specify the delimiter used in your CSV file (e.g., comma ,, semicolon ;, etc.).
  5. Upload the CSV File:

    • Click "Select CSV file" and select the CSV file from your computer.
  6. Start the Import:

    • Press the Import button to begin the process.
  7. Verify the Import:

    • Once the import completes, navigate to the relevant content section (e.g., /admin/content) to confirm that the data has been successfully added.

Troubleshooting Tips

  • UTF-8 Encoding: Use a text editor like Notepad++ or a spreadsheet tool like Excel to ensure the file is saved in UTF-8 format.
  • Field Mapping: Ensure the column headers in your CSV match the field machine names in the selected entity type and bundle.
  • Error Logs: If the import fails, check the Drupal logs (/admin/reports/dblog) for error details.

This approach ensures a smooth and straightforward import process for simple CSV files.

Help improve this page

Page status: No known problems

You can: