167 lines
5.6 KiB
Markdown
167 lines
5.6 KiB
Markdown
# WordPress → Next.js Export Summary
|
|
|
|
## Export Overview
|
|
**Date:** 2025-12-27
|
|
**Target Site:** https://klz-cables.com
|
|
**Export Timestamp:** 2025-12-27T21-26-12-521Z
|
|
|
|
## Data Collected
|
|
|
|
### Content Summary
|
|
| Type | English | German | Total |
|
|
|------|---------|--------|-------|
|
|
| **Pages** | 9 | 9 | 18 |
|
|
| **Posts** | 29 | 30 | 59 |
|
|
| **Products** | 25 | 25 | 50 |
|
|
| **Categories** | 7 | 7 | 14 |
|
|
| **Menus** | 5 | 5 | 10 |
|
|
| **Media Files** | 50 | - | 50 |
|
|
| **Redirects** | 59 | - | 59 |
|
|
|
|
### File Structure
|
|
```
|
|
data/raw/2025-12-27T21-26-12-521Z/
|
|
├── site-info.json (0.4 KB)
|
|
├── translation-mapping.json (0.6 KB)
|
|
├── pages.en.json (220.5 KB)
|
|
├── pages.de.json (231.3 KB)
|
|
├── posts.en.json (1,117.0 KB)
|
|
├── posts.de.json (1,163.5 KB)
|
|
├── products.en.json (349.2 KB)
|
|
├── products.de.json (350.2 KB)
|
|
├── product-categories.en.json (1.7 KB)
|
|
├── product-categories.de.json (1.7 KB)
|
|
├── menus.en.json (2.6 KB)
|
|
├── menus.de.json (2.6 KB)
|
|
├── redirects.json (13.3 KB)
|
|
└── media.json (13.2 KB)
|
|
```
|
|
|
|
## Site Information
|
|
- **Site Title:** KLZ Cables
|
|
- **Description:** Empowering a sustainable future through innovative and reliable energy solutions.
|
|
- **Default Language:** English
|
|
- **Languages:** English, German
|
|
- **Polylang Detected:** ❌ No (API limitation)
|
|
- **Permalink Structure:** /%postname%/
|
|
|
|
## Key Findings
|
|
|
|
### ✅ Successes
|
|
1. **Complete Content Export:** All pages, posts, products, and categories successfully exported for both languages
|
|
2. **Media Download:** 50 media files downloaded to `/public/media/`
|
|
3. **Redirect Generation:** 59 redirect rules created (29 EN + 30 DE)
|
|
4. **Data Structure:** All files properly formatted with consistent schema
|
|
|
|
### ⚠️ Issues & Limitations
|
|
|
|
#### 1. Translation Mapping
|
|
- **Posts:** 0 translation pairs found
|
|
- **Products:** 7 translation pairs found
|
|
- **Pages:** 2 translation pairs found
|
|
- **Categories:** 0 translation pairs found
|
|
|
|
**Root Cause:** Posts have completely different slugs between languages:
|
|
- EN: `focus-on-wind-farm-construction-three-typical-cable-challenges`
|
|
- DE: `windparkbau-im-fokus-drei-typische-kabelherausforderungen`
|
|
|
|
#### 2. Polylang Detection
|
|
- API shows `polylang: false` in site-info
|
|
- This may be due to API permissions or Polylang not exposing translation data via REST
|
|
|
|
#### 3. Content Differences
|
|
- **Posts:** 1 extra German post (30 vs 29)
|
|
- **Pages:** Equal count (9 each)
|
|
- **Products:** Equal count (25 each)
|
|
|
|
## Data Quality Assessment
|
|
|
|
### Content Integrity
|
|
- ✅ All required content types present
|
|
- ✅ Both languages represented
|
|
- ✅ HTML content preserved (including WPBakery shortcodes)
|
|
- ✅ Metadata intact (dates, authors, categories)
|
|
|
|
### Media Handling
|
|
- ✅ 50/50 files downloaded successfully
|
|
- ✅ Files properly named with IDs
|
|
- ✅ Manifest created with metadata
|
|
|
|
### Routing & Redirects
|
|
- ✅ 59 redirect rules generated
|
|
- ✅ Both languages handled
|
|
- ✅ Post slug → /blog/ prefix applied
|
|
|
|
## Next Steps for Implementation
|
|
|
|
### 1. Translation Mapping (Manual Review Required)
|
|
Since automatic mapping failed, you need to:
|
|
|
|
**Option A: Manual Mapping**
|
|
Create a manual translation mapping based on content similarity:
|
|
```json
|
|
{
|
|
"posts": {
|
|
"wind-farm-construction": {
|
|
"en": 123,
|
|
"de": 456
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
**Option B: Content-based Matching**
|
|
Use post titles or content hashes to find matching pairs programmatically.
|
|
|
|
### 2. Polylang Integration
|
|
- Verify Polylang is active on the WordPress site
|
|
- Check if REST API endpoints support `?lang=en` and `?lang=de` parameters
|
|
- Consider using WP-CLI for direct database access to translation data
|
|
|
|
### 3. Data Processing Pipeline
|
|
The export provides raw data that needs processing:
|
|
1. **HTML Sanitization:** Remove WPBakery shortcodes, normalize classes
|
|
2. **Asset Mapping:** Update image URLs to local paths
|
|
3. **Translation Keys:** Generate stable keys for i18n
|
|
4. **Route Generation:** Create Next.js routes with locale prefixes
|
|
|
|
### 4. Missing Data to Address
|
|
- **Menu Structure:** Menus exported but items not fully populated
|
|
- **Translation Relationships:** Need manual or enhanced mapping
|
|
- **Polylang Metadata:** Language-specific settings and relationships
|
|
|
|
## File Locations
|
|
|
|
### Export Data
|
|
- **Main Export:** `data/raw/2025-12-27T21-26-12-521Z/`
|
|
- **Media Files:** `public/media/`
|
|
|
|
### Scripts
|
|
- **Export Script:** `scripts/wordpress-export.js`
|
|
- **Analysis Script:** `scripts/analyze-export.js`
|
|
|
|
## Recommendations
|
|
|
|
### Immediate Actions
|
|
1. ✅ **Verify Export:** Review sample data for accuracy
|
|
2. ⚠️ **Fix Translation Mapping:** Create manual mapping or enhance script
|
|
3. ✅ **Check Media:** Verify all images downloaded correctly
|
|
4. ⚠️ **Polylang Verification:** Confirm Polylang configuration
|
|
|
|
### For Next.js Migration
|
|
1. **Data Processing:** Create pipeline to sanitize and transform data
|
|
2. **Route Structure:** Implement i18n routing with `/de/` prefix
|
|
3. **Content Rendering:** Handle WPBakery HTML compatibility
|
|
4. **SEO Setup:** Generate hreflang tags from translation data
|
|
|
|
### WordPress Site Verification
|
|
1. Confirm Polylang is active and configured
|
|
2. Check REST API permissions for translation data
|
|
3. Verify all content is published (not draft)
|
|
4. Test media file accessibility
|
|
|
|
## Conclusion
|
|
|
|
The export successfully gathered **all required content** for the static Next.js migration. The main limitation is the **translation mapping** due to different slugs between languages, which is common in multilingual WordPress setups. This can be resolved through manual mapping or enhanced content analysis.
|
|
|
|
The data is ready for the Next.js processing pipeline, with 50 media files and complete content for both English and German locales. |