A Craft CMS plugin for importing SEO metada from CSV files and automatically creating entries, with an intuitive drag-and-drop field mapping interface and SEOmatic integration.
- π― Flexible CSV Processing: Accepts any column names - no rigid header validation
- π Visual Field Mapping: Drag-and-drop interface with double-click convenience and remove buttons
- π³ Hierarchical Import: Automatic parent-child relationships based on URL structure
- π Entry Duplication: Uses existing entries as templates with field serialization
- π¨ Enhanced Preview: Tree-structured hierarchy display with visual depth indicators
- π Complete CSV Preview: Scrollable table with sticky headers showing all data
- π§ SEOmatic Integration: Automatically populates SEO meta descriptions
- β‘ Skip Homepage Option: Checkbox to exclude homepage entries from import
- β Success Messaging: Clear feedback with enhanced visual indicators
- Craft CMS 5.0+
- PHP 8.2+
- SEOmatic plugin (optional, for SEO field mapping)
composer require matrixcreate/craft-simple-seo-import- Download the plugin files
- Copy to your
plugins/directory - Add to your project's composer.json:
{
"repositories": [
{
"type": "path",
"url": "./plugins/simple-seo-import"
}
],
"require": {
"matrixcreate/craft-simple-seo-import": "*"
}
}- Run
composer install - Install the plugin through the Craft control panel
The plugin is completely flexible with column names. You can use any column headers - the field mapping step handles all variations.
URL,Slug,Page Title,Hero Text,Description
https://site.com/services,services,Services,Our services,Welcome to Services
https://site.com/services/dental,dental,Dental Services,Dental care,Quality Dental Care
https://site.com/services/dental/cleaning,cleaning,Teeth Cleaning,Professional cleaning,Professional Teeth CleaningThe plugin automatically detects parent-child relationships based on URL structure:
/servicesβ Top level entry/services/dentalβ Child of "services"/services/dental/cleaningβ Child of "dental"
Navigate to Simple SEO Import in the control panel and upload your CSV file. Any column names are accepted.
- Choose an existing entry to use as a template
- Optionally check "Skip first row" to exclude homepage entries
Use the visual interface to map CSV columns to entry fields:
- Drag and drop CSV fields to target fields
- Double-click CSV fields for auto-mapping convenience
- Red X buttons to quickly remove mappings
Review the complete hierarchical structure with:
- Visual depth indicators and color coding
- Parent-child relationships clearly displayed
- Complete CSV data preview with scrollable table
Perform the final import with automatic parent-child relationship creation.
The plugin supports these target fields:
hierarchy.addressβ URL field for hierarchy detection (not saved to entries)entry.slugβ Entry's URL slugentry.titleβ Entry's title fieldentry.heroTitleβ Custom Rich Text/CKEditor fieldseomatic.meta.descriptionβ SEOmatic meta description field
- Import Order: Parents created first, then children
- Preview Order: Tree structure with proper nesting
- Depth Indicators: Visual levels (Top Level, Level 2, Level 3, etc.)
- Color Coding: Different colors per depth level
- Multi-step Wizard: Clear progression through upload β map β preview β import
- Real-time Validation: Contextual error messages
- Dual Navigation: Top and bottom action buttons
- Complete Data Display: No artificial preview limits
- Field Serialization: Reliable entry duplication using Craft's native methods
- URL Parsing: Intelligent parent-child detection from URL structure
- Session Management: Secure data handling throughout the import process
- Plain Text fields
- Rich Text/CKEditor fields
- Lightswitch fields
- Asset fields
- SEOmatic fields
- Content Block fields (due to architectural restrictions)
Built with modern web technologies:
- Enhanced JavaScript: Multi-step wizard with drag-and-drop
- CSS Grid & Flexbox: Responsive layouts
- AJAX Integration: Seamless user experience
- PHP 8.4: Modern PHP features and type declarations
src/
βββ Plugin.php # Main plugin class
βββ controllers/
β βββ ImportController.php # Import workflow endpoints
βββ services/
β βββ CsvParserService.php # Flexible CSV parsing
β βββ EntryDuplicatorService.php # Entry creation with hierarchy
β βββ HierarchyService.php # URL parsing and relationships
βββ templates/
βββ index.twig # Complete wizard interface
- Issues: GitHub Issues
- Documentation: GitHub README
- Developer: Matrix Create
MIT License - see LICENSE file for details.
See CHANGELOG.md for version history and updates.