Back to Community

Troubleshooting Common WooCommerce Product Import Errors

3 threads Sep 21, 2025 PluginWoocommerce

Content

Importing products via CSV is a powerful feature of WooCommerce, but it can sometimes lead to frustrating errors. Based on common community reports, this guide covers the most frequent issues users encounter and provides practical solutions to resolve them.

Common Error: "Error getting remote image... Error: Forbidden"

This error occurs when the WooCommerce importer attempts to fetch a product image from a remote URL but is denied access by the remote server.

Why This Happens:

  • The remote server has security measures (like a firewall or hotlink protection) that block requests from your site.
  • The image URL is incorrect or inaccessible.
  • The server's user agent (the identity your site uses to request the image) is being blocked.

How to Resolve It:

  1. Download and Host Images Locally First: The most reliable fix is to avoid remote image fetching altogether. Download all product images to your server first. Then, in your CSV file, update the image URLs to point to their new local paths (e.g., https://yourdomain.com/wp-content/uploads/your-image.jpg).
  2. Check Remote Server Configuration: If you control the remote server, ensure it is not blocking incoming requests. You may need to adjust firewall rules or disable hotlink protection temporarily for the import.
  3. Verify File Permissions: While folder permission 755 is generally correct, also ensure the files themselves have appropriate permissions (typically 644).

Common Challenge: Handling Large Import Files

Users often run into timeouts or memory exhaustion when trying to import large CSV files (e.g., 7.8MB with 2500 products).

Why This Happens:

  • Default server configuration values for max_execution_time and memory_limit in PHP are too low for large operations.
  • The import process is resource-intensive, especially for products with numerous variations or custom meta data.

How to Resolve It:

  1. Split the CSV File: The most straightforward solution is to break the large CSV into multiple smaller files (e.g., 500 products each) and run the import multiple times. Many free online tools and spreadsheet applications can split CSV files easily.
  2. Increase PHP Limits: You can try temporarily increasing your server's PHP limits. Add the following code to your wp-config.php file above the line that says "That's all, stop editing!":
    define('WP_MEMORY_LIMIT', '512M');
    @ini_set('max_execution_time', '300');
    Note: Some hosting providers may not allow these changes, and requiring 1.5GB of memory for 80 products often indicates a deeper conflict.
  3. Use Command-Line WP-CLI (Advanced): For technically advanced users, the wp woo-commerce product import command via WP-CLI can be more efficient for handling large imports as it runs outside of web browser limitations.

Common Challenge: Controlling Import Batch Size

Some users need to process fewer rows per batch to avoid hitting memory limits, but the option is not visible in the default import interface.

How to Adjust It:

The number of rows processed in a batch is indeed controlled by the lines parameter in the underlying code. To modify it, you can use a filter in your theme's functions.php file or a custom plugin:

add_filter( 'woocommerce_product_import_batch_size', function() {
    return 5; // Reduce the batch size to 5 rows
});

Adding this code will force the importer to process only 5 lines at a time, which can significantly reduce memory usage during the import job.

Summary and Best Practices

  • Always host product images on your own server before importing.
  • For large imports, split your CSV into manageable chunks.
  • Use the woocommerce_product_import_batch_size filter to reduce memory usage per batch.
  • Consider using WP-CLI for very large, repetitive import tasks if you have server command-line access.

If problems persist after trying these steps, it is often helpful to check for conflicts by disabling other plugins temporarily and using a default theme like Storefront to see if the import process improves.