On this page
Import content
Last updated on
21 December 2024
-
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.
-
Access the Import Page:
- Navigate to
/admin/content/csv-importerin your Drupal site.
- Navigate to
-
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.
-
Set the Delimiter:
- Specify the delimiter used in your CSV file (e.g., comma
,, semicolon;, etc.).
- Specify the delimiter used in your CSV file (e.g., comma
-
Upload the CSV File:
- Click "Select CSV file" and select the CSV file from your computer.
-
Start the Import:
- Press the Import button to begin the process.
-
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.
- Once the import completes, navigate to the relevant content section (e.g.,
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:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion