You make bulk changes in WooCommerce in three ways: with the Bulk edit option of the product list for simple changes, by exporting and importing a CSV file for hundreds of products, or with a bulk edit plugin that works like an Excel sheet inside the site. Before any bulk change keep a copy of the database, because a mistake spreads to every product at once. Never change the slug with bulk tools, because that is how duplicate slugs are created.
Which method should I choose
| Method | Suits | Watch out |
|---|---|---|
| WooCommerce Bulk edit | Raising or lowering prices, stock, stock status on a few dozen products | Does not change prices on variations |
| CSV export and import | A different price or stock per product, across many products | Matching is done by ID or SKU |
| Bulk edit plugin | Frequent changes, many columns, filters | May write directly to the database without WordPress's checks |
| Direct database change | Only for an experienced developer | Bypasses WooCommerce and its caches |
Before any bulk change, keep a backup
- Take a copy of the database from cPanel > Databases > phpMyAdmin with Export. See the details in the phpMyAdmin guide.
- Also export the products to CSV, as described below. It is the quickest copy for restoring only prices and stock.
- If you want to test first, make the change on a copy of the site (staging), as explained in the article on the child theme and testing on staging.
At Konet, JetBackup 5 keeps automatic backups of your account. In a shop, however, restoring the whole database also deletes the orders placed after the backup. That is why it is better to have your own copy taken just before the change. See also how to restore a backup in a shop without losing orders.
Bulk price changes in WooCommerce from the product list
This is the built-in WooCommerce bulk edit, with no extra plugin.
- Open Products > All Products.
- Filter the list, for example by category or stock status, and click Filter.
- Tick the products you want to change. The checkbox in the list header selects them all.
- From Bulk actions choose Bulk edit and click Apply.
- In the Price field choose Change to: for a new price or Increase existing price by (fixed amount or %): and enter the amount or percentage, for example
10%. Matching options exist for decreasing and for the sale price. - Leave all the other fields as they are, on the default "No change".
- Click Update.
Things to watch:
- Bulk edit only changes the products on the page you are viewing. For more, increase Number of items per page in Screen Options at the top right, or repeat on each page.
- Price changes apply to simple products. Variation prices are changed inside each variable product or with CSV.
- When you change the regular or sale price, WooCommerce clears the scheduled sale dates. Set them again if needed.
- After a percentage change to sale prices, check a few products for rounding.
- Many products at once put load on the server. Work in batches, for example 50 to 100 products at a time.
Bulk stock updates
The same Bulk edit screen has the stock fields:
- In stock?: the stock status, in stock, out of stock or on backorder.
- Manage stock?: whether WooCommerce counts units.
- Stock qty: a new quantity, or an increase or decrease of the current one.
For a different quantity on each product, use CSV.
Exporting WooCommerce products and importing a CSV with new prices
With this method you change prices and stock in a spreadsheet and send them back to the site.
Export
- Open Products > All Products and click Export at the top.
- In Which columns should be exported? keep only what you need: ID, SKU, name, Regular price, Sale price, stock.
- Click Generate CSV and download the file.
Changes in the file
- Open the CSV in a spreadsheet program and keep the UTF-8 encoding, so that Greek text is not corrupted.
- Change only the price and stock columns. Don't change the IDs and SKUs, because WooCommerce uses them to find which product to update.
- Delete any columns you don't want changed. A column missing from the file does not affect the products.
- Watch out for empty cells. For example, an empty stock column disables stock management for that product.
Import (WooCommerce CSV import)
- Open Products > All Products and click Import.
- Choose your file.
- Tick Update existing products and click Continue.
- Check the column mapping and click Run the importer.
- Stay on the page until it finishes and read the report for skipped rows.
For large catalogs split the file into smaller pieces. If the import stops halfway, see the article on Request Timeout.
Bulk edit plugin, how it works and what to watch out for
Bulk edit plugins show products in a table, like an Excel sheet inside WordPress. Most of them share the same basic features:
- Columns. You choose which columns are shown, such as title, SKU, price, stock, categories and fields from other plugins.
- Filters. You isolate products by category, price, SKU, title or attribute.
- Saved views. You keep a combination of columns and filters under a name, for example "Stock check", to load it again.
- Cell editing. You change the value in one cell and it is usually saved immediately.
- Bulk changes. You tick several products and apply the same change to all of them.
Many of these plugins write directly to the database, without the checks WordPress performs when you save a product from its own screen. That is why:
- Hide the Slug column or never touch it.
- Don't paste content into whole columns without checking which column you are pasting into.
- Make the bulk change on a few products first and check their pages on the site.
- If the plugin has a change history or undo, learn how it works before the big change.
- After the change, check that prices also show correctly in the cart, not only on the product page.
Duplicate slugs, several products appear on the same page
The slug is the last part of the product's address, for example example.gr/product/blue-shirt/. When two products have the same slug, the page of one may show several products one below the other, or the wrong product.
When you save from the product screen, WordPress does not allow a duplicate slug. It adds a number at the end on its own, for example blue-shirt-2. A tool that writes the slug column directly to the database bypasses this check. That is how duplicate slugs appear, especially when the same text is pasted into the whole column.
To fix a few products:
- Open Products > All Products and find the products with the same name or the same address.
- Keep the slug on the oldest product, because that one usually already ranks on Google.
- On the others click Quick Edit, type a new Slug or clear it, and click Update. If you leave it empty, WordPress creates a new slug from the title, with a number at the end where needed.
- Clear the site's cache and open the pages again.
If there are hundreds of duplicate slugs, the fix needs a database check by a developer. Add redirects for any addresses that changed and get visits.
Changing the database directly
Prices and stock can also be changed with SQL statements in phpMyAdmin. We don't recommend it, unless it is done by a developer who knows the WooCommerce structure:
- WooCommerce keeps the price in more than one place, such as the regular price, the sale price and the final price. If you change only one, the site shows one price in the list and another in the cart.
- The Product lookup tables, used for sorting and price filters, are not updated on their own.
- The actions other plugins perform when a product changes do not run, such as XML feeds or ERP sync.
- A mistake in a statement changes every product at once and cannot be undone without a backup.
If a direct database change has been made, open WooCommerce > Status > Tools. There, regenerate the Product lookup tables and run Clear transients for WooCommerce transients. Then clear the site's cache.
Frequently Asked Questions
Bulk edit did not change the prices of my variations, why?
Bulk price changes apply to simple products. For variations, change the prices inside each variable product or use CSV export and import, where each variation has its own row.
After the CSV import new products were created instead of updating the old ones, what happened?
Most likely Update existing products was not ticked, or the file's IDs and SKUs don't match the site's. Delete the new products, fix the file and run the import again.
After a bulk edit one product page shows several products, what do I do?
That is the symptom of duplicate slugs. Fix the slugs as described above and hide the Slug column in the bulk edit plugin.
The bulk change stops halfway or the admin area is very slow, why?
Usually too many products are sent in one request. Work in smaller batches. If the admin area is slow even for simple changes, see the article on slow wp-admin.
The new prices don't show on the site, although they are correct in the admin area, why?
You are seeing a stored page. Clear the cache of the site and open the page in a private browsing window.
I got all the prices wrong, how do I go back?
If you have a CSV from before, import it again with Update existing products. Otherwise restore the database from the phpMyAdmin copy or from JetBackup 5, taking care of the orders received in the meantime.