WordPress/WooCommerce Product Import Guide
Version: 1.0 Last Updated: 2025-01-10 Author: Claude Code Strategic Plannerπ Table of Contents
- Pre-Import Checklist
- Import Methods Overview
- Method A: WP All Import Plugin
- Method B: WooCommerce REST API
- Method C: Native CSV Import
- Post-Import Actions
- Troubleshooting
- Reference Files
1. Pre-Import Checklist
β Backup Database
CRITICAL: Always backup before importing!β Check Product Categories
Ensure categories exist before importing:- Meso
- Filler
- CΔng Chα»
- [Other categories from your data]
β Verify Image URLs
Check if image URLs are accessible:β Test with 1-2 Products First
ALWAYS test with a small batch before full import:2. Import Methods Overview
| Method | Difficulty | Speed | Reliability | Best For |
|---|---|---|---|---|
| WP All Import | ββ Easy | π Fast | β Very High | Large imports, complex data |
| REST API | βββ Medium | ππ Very Fast | β High | Developers, automation |
| Native CSV | β Easy | π’ Slow | β οΈ Medium | Simple imports, small batches |
3. Method A: WP All Import Plugin (Recommended)
3.1 Installation
- Plugins β Add New
- Search βWP All Importβ
- Install & Activate
- Install βWP All Import - WooCommerce Add-Onβ
3.2 Step-by-Step Import
Step 1: Prepare JSON File
Convert your JSON to WP All Import compatible format:Step 2: Start Import
- Navigate to: All Import β New Import
- [SCREENSHOT: Select βUpload a fileβ]
- Choose:
wp_import.json - Click βUpload file and continueβ
Step 3: Configure Import
[SCREENSHOT: Drag & Drop template builder] Post Title:- Drag
{name}to Title field
- Drag
{description}to Content field - Drag
{short_description}to Excerpt field
- Drag
{image}to Images field - Enable βDownload images externallyβ
- Enable βUse as featured imageβ
Step 4: WooCommerce Fields
Click βConfigure WooCommerce Settingsβ [SCREENSHOT: WooCommerce field mapping]| WP All Import Field | Source Field | Notes |
|---|---|---|
| SKU | {sku} | Must be unique |
| Regular Price | {price} | Required |
| Sale Price | {sale_price} | Optional |
| Stock | {stock} | Default: 0 |
| Manage Stock | {manage_stock} | yes/no |
| Backorders | {backorders} | no/notify/yes |
Step 5: Categories
[SCREENSHOT: Category mapping]- Drag
{categories}to Product Categories - Select: βMatch by nameβ
- Enable: βCreate categories if they donβt existβ
Step 6: Import Options
[SCREENSHOT: Import settings]- Choose: βProcess in backgroundβ (recommended for >100 products)
Step 7: Run Import
Click βContinue & Run Importβ [SCREENSHOT: Progress bar]- Monitor progress in real-time
- Receive email when complete
3.3 Advanced Features
Automatic Scheduling
Custom Field Mapping
4. Method B: WooCommerce REST API
4.1 Setup Authentication
- WooCommerce β Settings β Advanced β REST API
- Click βAdd Keyβ
- Description: βProduct Importβ
- Permissions: Read/Write
- Click βGenerate API Keyβ
- COPY Consumer Key & Secret (you wonβt see them again!)
4.2 Prepare Import Script
Create/tmp/import_products.js:
4.3 Run Import Script
4.4 Update Existing Products
4.5 Batch Import (WooCommerce 3.0+)
5. Method C: Native CSV Import via WooCommerce
5.1 Prepare CSV Template
Create/tmp/products_import.csv:
5.2 Convert JSON to CSV
Create/tmp/json_to_csv.py:
5.3 Import via WooCommerce
- Navigate to: WooCommerce β Products β Import
- [SCREENSHOT: CSV upload screen]
- Choose
products_import.csv - Click βUpload file and continueβ
5.4 Map CSV Columns
[SCREENSHOT: Column mapping screen] Required Mappings:- Name β Name
- SKU β SKU
- Regular price β Regular price
- Categories β Categories
- Images β Images
5.5 Run Import
Click βRun Importβ [SCREENSHOT: Import progress]6. Post-Import Actions
6.1 Verify Prices
6.2 Check Sale Prices
6.3 Test Product Pages
6.4 Update Inventory
6.5 Regenerate Thumbnails
6.6 Clear Cache
7. Troubleshooting
7.1 Common Issues
Issue: Images Not Importing
Symptoms:- Products imported but no images
- Broken image icons
- Check image URL accessibility:
-
Enable βDownload images externallyβ:
- WP All Import: Images section β Enable βDownload externally hosted imagesβ
- Check file permissions:
- Increase memory limits:
Issue: Duplicate SKUs
Symptoms:- Import fails with βSKU already existsβ
- Products not updating
- Find duplicates:
- Remove duplicates:
- Update import strategy:
- Enable βUpdate existing productsβ
- Match by: SKU
Issue: Categories Not Mapping
Symptoms:- Products import but no categories
- All products in βUncategorizedβ
- Check category slugs:
- Create missing categories:
- Verify mapping:
- WP All Import: Categories β Match by βnameβ (not slug)
- Enable βCreate categories if they donβt existβ
Issue: Import Timeout
Symptoms:- Import stops after 30-60 seconds
- Only some products imported
- Increase PHP limits:
-
Use background processing:
- WP All Import: Enable βProcess in backgroundβ
- Set lower batch size: 50 products per batch
- Split large files:
Issue: Special Characters Not Displaying
Symptoms:- Vietnamese characters show as question marks
- Accented letters broken
- Check database charset:
- Convert to UTF-8:
- Set charset in wp-config.php:
7.2 Error Codes Reference
| Error Code | Meaning | Solution |
|---|---|---|
woocommerce_rest_product_invalid_sku | SKU already exists | Use unique SKU or update existing |
woocommerce_rest_invalid_image | Invalid image URL | Check URL returns 200 OK |
woocommerce_rest_invalid_category | Category doesnβt exist | Create category first |
woocommerce_rest_product_missing_price | Price required | Add regular_price |
500 Internal Server Error | Server error | Check PHP error logs |
7.3 Enable Debug Mode
8. Reference Files
8.1 Data Sources
New Products to Add:8.2 File Formats
Expected JSON Structure
8.3 Quick Reference Commands
9. Best Practices
β DO:
- Always backup before importing
- Test with 2-5 products first
- Use unique SKUs
- Optimize images before import (max 1500px, under 500KB)
- Clean data before import (remove special chars, trim spaces)
- Use background processing for >100 products
- Monitor server resources during import
- Keep import logs for troubleshooting
β DONβT:
- Import thousands of products without testing
- Use spaces or special chars in SKUs
- Skip category creation
- Ignore error messages
- Import during peak traffic hours
- Forget to clear cache after import
- Assume everything worked without verification
10. Support Resources
Documentation: Tools:- WP-CLI: https://wp-cli.org/
- WooCommerce CLI: https://github.com/woocommerce/wp-cli-cli
- WordPress.org Forums
- WooCommerce Slack Community
- Stack Overflow (tag: woocommerce)
Appendix A: Import Workflow Checklist
Before Import:
- Backup database
- Backup uploads folder
- Verify image URLs accessible
- Create all categories
- Test with 1-2 products
- Review JSON structure
- Clean data (remove duplicates, fix SKUs)
During Import:
- Monitor progress
- Check for errors
- Verify server resources
- Watch error logs
After Import:
- Verify product count
- Check sample products
- Test prices (regular & sale)
- Verify categories
- Test product pages
- Check images load
- Update inventory
- Clear cache
- Test checkout
- Revoke API keys (if used)
End of Guide For questions or issues, refer to troubleshooting section or consult WordPress/WooCommerce documentation.