I’ve been lately working on many eCommerce websites based on WordPress + WooCommerce combo and thought I would share some tips and tricks to make building and managing WooCommerce sites a lot easier. In this post you’ll learn how to mass import, edit and update product data without losing your sleep and health!
CSV stands for Comma Separated Value. These are basically plain text files that contain values separated by commas. An example of a simple CSV file could be like this:
Example Product,Description of Example Product,199.99
Another Product,Just another Example Product,149.99
Third Example Product,This is the description of the 3rd Product,299.99
The first row of a CSV file usually consists of a header and the following rows include the actual data. Think of them as an Excel Spreadsheet in pure text format.
Before You Begin
Before you can begin preparing a CSV File, you’ll need to know what fields are used for your WooCommerce products. For this, you’re going to need to create at least one fully configured product. You will also need a WordPress plugin that can export this product as a CSV to use as a template. For this, I am going to use Product CSV Import Suite. Because some WordPress plugins add custom information for products, it is highly advisable to install all the plugins on your site before you begin. This will ensure you have all the fields you’ll need.
Preparing a CSV File to Use as a Template
To prepare a CSV file, you can use any spreadsheet program such as Microsoft Excel, OpenOffice Calc, LibreOffice Calc, or Google Sheets. There are also tools specifically created for CSV editing available. In this example, I will work with Google Sheets as it is free and easily accessible via web browser.
First, export the existing product(s) as a CSV to use as a template. Import this file into a spreadsheet editor of your choice. Follow the example format from the above row(s) in order to ensure everything will be imported correctly. When you are done editing, double check that everything is entered correctly and save the file in .csv format.
In case you are using Variation Products, you are going to need to export product variations and create them in a separate file.
Import Products From a CSV File to WooCommerce
When CSV files are done, you may now begin importing them by uploading the file(s) onto the importer. Product CSV Import Suite will then give you the last chance to verify the import data before beginning the import process. If everything is okay, you may begin importing.
An important note if you use the “merge” feature in Product CSV Import Suite. If products and variations already have correct images, you may want to remove the image columns from your CSV file to prevent the merge feature from creating duplicate media files. I once ended up with 36,000 media entries while having only 13,000 product variations due to multiple merges.
- Install all the plugins you will use on the website
- Set up and configure at least one product to use as a CSV template
- Export the CSV using a CSV export plugin for WooCommerce
- Open the CSV file in a Spreadsheet Editor (Excel, Google Sheets, etc.)
- Add product names, details and other data following the example product
- Save the file as .csv and import it to WooCommerce using an import plugin
- Now you should have your products set up 🙂
If you are importing tons of products, try to split the files into 2000 or so rows to avoid errors. Remember to copy the first row as the header in a new file.
Got questions? I’ll be happy to help!