Are you looking for ways to bulk edit the prices of multiple products? You’ve come to the right place. In this article, we will show you different methods to change WooCommerce prices in bulk.
Why Edit Prices in Bulk in WooCommerce?
You may need to update prices for multiple products in your store in many situations. But if you sell many items, having to change the prices for each product one by one is time-consuming and inefficient. Not only will you waste a lot of time doing a repetitive task, but you’ll also be more likely to make mistakes when typing every single price.
That’s why being able to change prices in bulk will help you save time and make your life easier. For example, if you run a limited promotion or offer a special discount on certain items, you may need to edit the prices of several products. And once the sale or promotion is over, you must revert the prices to their original cost.
Alternatively, if you want to increase or decrease the prices of a certain category, type of product, or store-wide, you will need to update the prices of many products. The more products your store has, the longer it will take.
As you can see, these are everyday situations for many stores, so it’s helpful to be able to edit the prices in bulk. Let’s see how to do that.
How to Change WooCommerce prices in Bulk
There are different ways to edit WooCommerce prices in bulk:
- WooCommerce default options
- Using a plugin
- Exporting and then importing a CSV file
- Programmatically
Each method is more appropriate for different situations. Let’s examine each one more closely.
1. WooCommerce Default Options
If your store contains only simple products and you want to update the prices of multiple products, the WooCommerce default options have you covered. Remember that the default options don’t support variable products, grouped products, or subscriptions. So if you only offer simple products in your store, this is a good option.
First, in your WordPress admin dashboard, navigate to Products > All Products. Select the products you want to edit either manually or by applying filters, select Edit from the Bulk Actions drop-down, and then click Apply.
You will now see a product editing form. There, you can edit multiple features of the products, such as brand, category, and so on. Since we only want to change the price, go to the Product data section and find the Price and Sale options. Here, you can update the prices of your products at once.
The default options in WooCommerce to change products prices in bulk include:
- Price – Increase or decrease the existing price by (fixed amount or percentage): You can increase or decrease the price of all the products by a fixed amount or percentage
- Sale – Increase or decrease existing sale price by (fixed amount or percentage): Increase or decrease the current sale price by a fixed amount or percentage.
- Sale – Set to regular price decreased by (fixed amount or percentage): You can set your sale price by reducing the current price by a fixed amount or percentage.
Using the filters, you can also apply these changes to a specific category, brand, or type of product.
Once you are happy with the new prices, scroll down and click on the Update button to save the changes. That’s it! You have now successfully updated the prices of your WooCommerce products in bulk.
As mentioned earlier, the default options only work with simple products. So what can you do if you also offer variable or grouped products, subscriptions, and so on? One option is to rely on third-party plugins.
2. Using a third-party Plugin
There are several plugins to edit prices in bulk. For this tutorial, we will use ELEX WooCommerce Advanced Bulk Edit Products, Prices & Attributes. This is a freemium tool that offers multiple features for bulk editing products and is also easy to use.
However, it is essential to note that the free plugin only supports simple products. If you want to use it for other products, you’ll need to get one of the premium versions starting at 79 USD. With that said, let’s see how you can update products in bulk using this plugin.
2.1) Install and Configure the Plugin
First, we’ll install the plugin. In your WP Admin Dashboard, navigate to Plugins > Add New. Search for the ELEX WooCommerce Advanced Bulk Edit Products, Prices & Attributes plugin and click Install Now. Once the plugin is installed, activate it.
Then head to WooCommerce > Bulk Edit Products and you will find all the settings and features of this plugin.
2.2) Select the Desired Products
Now it’s time to filter the products you wish to edit. You can filter products by title, type, categories, and prices range. You can also filter products by attributes and there are two ways to combine them: Group with OR or Group with AND.
- Group with OR lets you filter products by multiple attributes in such a way that the product is selected if it has at least one of the attributes.
- Group with AND lets you filter products by multiple attributes in such a way that the product has to have all the chosen attributes to get selected.
Once you have filtered the products, press the Preview Filtered Products button at the bottom-right corner and you will be taken to the preview page. Here you can have a look at the selected products and make sure that you’ve only selected the products you want to update.
After reviewing the selected products, scroll down and press Continue.
2.3) Update Product Prices in Bulk
On the edit products page, scroll down until you see the Price section. Here, you can now increase or decrease the product prices by a fixed amount or percentage, or set a flat price for all of them. Similarly, you can increase or decrease the sale price by a fixed amount or percentage, or set a flat price.
After you have updated the product prices, scroll down and click Update Products to save the new prices. All the product prices will be updated, and you will see a success message on the next page.
That’s it! You have successfully changed your WooCommerce product prices in bulk using a plugin. The process is similar regardless of the product type you’re updating, so you can edit the prices of your variable and grouped products in no time.
If you’re looking for more tools to edit prices in bulk, check out this list.
Besides the default options and third-party plugins, you can also update prices using a CSV file. Let’s see how to do that.
3. Change WooCommerce Bulk Prices by Exporting and Importing CSV
For this method, you first need to export all the product data to a CSV file. You will then edit this file and finally import it to WooCommerce to update all the current products with the new changes. Let’s have a look at this process step-by-step.
3.1) Export Products Data to a CSV File
First, you need to export your product data. To do that, go to your WP Admin Dashboard and navigate to Products > All Products. Select the products you want to export and click the Export button at the top.
This will take you to the export products wizard. You can also select the type and category of product you want to export from here, but we recommend doing that in the previous step. Check the “Yes, export all custom meta” box and press Generate CSV. This will generate a CSV file containing all the details about your products.
For more information about this process, check out our guide on how to export products in WooCommerce.
3.2) Edit the CSV File to Update Prices
Open up the downloaded CSV file using any compatible software like Microsoft Excel and look for the sale price and regular price columns. These contain the current prices of each product. Edit the prices you want and then save the file. You can use formulas to apply a fixed or percentage discount to all the products, set the same price for items of the same category, and so on.
3.3) Import the Updated CSV File
After that, you need to import the file back to WooCommerce. Once again, go to your WordPress Admin Dashboard, navigate to Products > All Products and click the Import button to start the import process.
Choose the CSV file that you just updated and make sure to check the “Update Existing Products” box. Otherwise, the existing products will be skipped instead of updated. Then press Continue.
The import wizard will ask you to map CSV fields to products. Leave everything as default, scroll all the way down, and click Run the Importer. This will start importing data from the CSV.
Once the process is complete, you will see a success message that the products were updated successfully.
That’s it! You can now go to your products page and verify the changes. That’s how easy it is to change WooCommerce prices in bulk with a CSV file. The process of exporting and then importing a file may seem troublesome, but it’s extremely easy and fast.
For a more detailed explanation about importing files, check out our guide on how to import products in WooCommerce.
The next method to update WooCommerce prices in bulk is to use code snippets. Don’t worry if you’re not a developer! We will provide you with snippets that you can use on your site and explain the code. You don’t need coding skills, but a basic understanding will help.
4. Update WooCommerce Prices Programmatically
In this section, we’ll show you how to programmatically edit multiple prices at once. We’ll use discounts that will be applied to the cart.
Usually, you would create a coupon code with a fixed or percentage discount and the customer would have to apply it during checkout to enjoy the discount. However, with our code snippets, you can automate the process. Instead of the customer having to use the coupon manually, the coupon will be applied automatically.
Before we look at the code, let’s see where and how you can add code snippets to your WordPress site.
Where and How to Add Code Snippets to Your WordPress Site
Let’s start with the basics. To edit WooCommerce prices in bulk, you’ll need to add the code snippets to the functions.php file of your current theme.
There are two ways of adding snippets to your sites.
- Using a child theme
- Using a plugin
1. Using a Child Theme
We recommend using a child theme to modify the functions.php file. If anything goes wrong while making changes directly to the functions.php file of the main theme, it can break your entire site.
Additionally, the changes you make to the main theme will be overridden by the theme updates, so you will have to make these changes manually every time the theme receives an update.
Therefore, having a child theme is recommended. If you don’t already have one, you can create one or use third-party child theme plugins, which make the process much easier.
Once your child theme is ready, let’s see how to edit the functions.php file. In your WP Admin Dashboard, go to Appearance > Theme Editor and make sure your child theme is selected. Then find the functions.php file on the right column and paste the code snippet at the end of the file.
That’s it. This is how you add code snippets to your functions.php file using a child theme. However, if you are not comfortable creating a child theme and editing core files, you can use a plugin.
2. Using the Code Snippets Plugin
Alternatively, you can add snippets using a plugin. For this demonstration, we’ll use the Code Snippets plugin.
First, you need to install it, so go to Plugins > Add New. Search for the Code Snippets plugin and click Install Now. Once the installation is complete, activate it.
After your plugin is activated, navigate to Snippets > Add New. Paste your code snippet in the code section and save the changes. You can also give it a label to easily identify it in the future.
With Code Snippets, you don’t need to create a child theme because the plugin handles everything for you. However, we still recommend having one.
Now that you know how to add code snippets to your site, let’s have a look at the code snippets to change WooCommerce prices in bulk.
Edit WooCommerce Prices Programmatically
This section will show you how to update prices using two different snippets. The first will apply the coupon automatically to specific products, and the second will apply it to the overall cart regardless of the products it contains.
Before applying the discount, you need to create a coupon code.
Create a Coupon in WooCommerce
In your WP Admin Dashboard, go to Marketing > Coupons > Add Coupon.
Select a name, type of discount, amount, and other details, and then press Publish to register your coupon. Write down the coupon code and leave it somewhere handy, as you’ll need to add it to the code snippets.
Now let’s move on to the code snippets.
4.1) Apply Coupon Automatically to Specific Products
You need to find the Product ID to apply the coupon to a specific product. Go to your WooCommerce Products page, hover over the product to which you want to apply the discount, and copy the Product ID.
Now, add the following code snippet to the functions.php file using your preferred method.
add_action( 'woocommerce_before_cart', 'quadlayers_coupon_individual_products' );
function quadlayers_coupon_individual_products () {
$coupon_code = 'quadlayers30'; //Use your coupon code between single quotes' '
if ( WC()->cart->has_discount( $coupon_code ) ) return;
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
$autocoupon = array( 2970 ); //Use your product ID inside the array( id )
if ( in_array( $cart_item['product_id'], $autocoupon ) ) {
WC()->cart->apply_coupon( $coupon_code );
wc_print_notices();
}
}
}
Remember to use your coupon code and product ID in the code.
Every time customers add this specific product to the cart, the coupon will be applied automatically.
Now let’s see how to apply the coupon and update the prices of several products at once.
4.2) Apply Coupon Automatically to the Cart
This snippet will apply a discount to the total amount of the cart, regardless of the products in it.
Add the following snippet to your site via your preferred method.
add_action( 'woocommerce_before_cart', 'quadlayers_coupon_overall_cart' );
function quadlayers_coupon_overall_cart () {
$coupon_code = 'quadlayers30'; //Use your coupon code between single quotes ' '
if ( WC()->cart->has_discount( $coupon_code ) ) return;
WC()->cart->apply_coupon( $coupon_code );
wc_print_notices();
}
That’s it! The coupon will now be automatically applied to the cart every time, irrespective of the contents of the cart. Once again, remember to use your coupon code in the snippet.
How to Increase WooCommerce Prices by a Percentage
After Christmas or Black Friday promotions, many stores have to update all their prices back to what they were before. The easiest way is to increase all the prices by a percentage. If you’ve read the post until now, you probably know how to do that, but we’ll show you an example to clear up any doubts.
You can increase prices by a set percentage using two different methods:
1. Increase prices with default Woocommerce options
Let’s say you want to increase all the prices by 25%. As long as you only have single products, you can do it with the default WooCommerce options.
- In your dashboard, go to the Products section
- Select all the products you want to update. If they’re all, simply check the Select All option
- Then press Bulk Actions > Edit
- Select Price > Change to > Set to regular price decreased by fixed amount or %
- Select 25% (or any other % you want) and press Update
That’s it! Note that if you also want to bulk change prices of variable, group, or subscription products, you’ll need to use some other methods described above.
2. Increase WooCommerce prices programmatically
Alternatively, you can increase WooCommerce prices by a percentage using a bit of code. Let’s see how to do that.
Note that this involves running an SQL query, so only try this if you have coding knowledge. Also, remember to do a database backup before starting.
Let’s say you want to increase all your prices by 30%. In that case, you can use this code:
UPDATE `wp_postmeta`
SET `meta_value` = ROUND(`meta_value` * 1.3, 2)
WHERE meta_key LIKE '%_price%'
AND (meta_value > 0 or `meta_value` != '')
AND `post_id` IN (
SELECT `ID`
FROM `wp_posts`
WHERE `post_type` = 'product'
AND `post_status` = 'publish'
AND `ID` = `post_id`
);
You might need to delete the product transient cache by going to Settings > Status > Tools tab, and under WooCommerce transients, you need to Clear transients.
With this snippet, you can also handle product variations by replacing this line:
WHERE `post_type` = 'product'
With:
WHERE `post_type` IN ('product','product_variation')
Additionally, you will also need to use:
DELETE
FROM `wp_options`
WHERE (`option_name` LIKE '_transient_wc_var_prices_%'
OR `option_name` LIKE '_transient_timeout_wc_var_prices_%')
Pro Tips for Managing WooCommerce Pricing
Here are some pro tips you need to keep in mind before proceeding with the pricing customization:
- Always back up your site before performing any WooCommerce bulk price update. This ensures you can restore your store if anything goes wrong.
- Use a staging environment to test your bulk price update WooCommerce changes. This will help avoid issues on your live store and keep the customer experience intact.
- Leverage filters and categories when using the WooCommerce bulk price edit feature. This allows for more targeted updates, especially during sales or seasonal promotions.
- Document your price changes, especially if multiple team members manage the store. Tracking what was edited and when helps troubleshoot and perform tracking.
- Monitor performance plugins or caching systems after making price updates. Some changes may not reflect immediately due to browser cache or site-level caching.
- Combine methods strategically, such as a plugin for simple edits and CSV imports for mass changes. This creates a flexible and efficient workflow for bulk price update WooCommerce management.
Frequently Asked Questions
Next, let’s see some frequently asked questions regarding this topic.
What is the best way to do a WooCommerce bulk price update?
The best method depends on your store size and needs. For an efficient WooCommerce bulk price update, you can use WooCommerce’s built-in bulk edit feature, import/export CSV files, or specialized plugins.
Can I do a WooCommerce bulk price edit without a plugin?
Yes, WooCommerce offers a basic bulk edit feature that lets you change prices for multiple products at once. However, for advanced bulk price update, WooCommerce tasks, plugins, or CSV imports might be more effective.
How can I undo a bulk price update in WooCommerce?
If you have a recent backup or are working in a staging environment, you can restore your store to undo any unwanted changes. Always back up before a WooCommerce bulk price edit.
Will bulk price updates affect sale prices in WooCommerce?
Bulk price update WooCommerce methods usually allow you to update regular and sale prices separately. It’s important to check settings carefully to avoid accidentally overwriting sale prices.
Is it safe to do a bulk price update on WooCommerce on a live store?
It is generally safe, but it is recommended that such updates be performed during low-traffic hours or on a staging site first. This ensures that your customers experience no disruption or pricing errors during a WooCommerce bulk price edit.
Conclusion
There are several situations in which you may need to update the prices of multiple WooCommerce products at once. Doing this manually is time-consuming and can lead to mistakes, especially if you have many items. That’s why you should find a more efficient solution.
In this guide, we’ve shown you different methods to change WooCommerce prices in bulk:
- Using the default WooCommerce options
- Using a third-party plugin
- By exporting and then importing a CSV file
- Updating prices programmatically
The default options get the job done, but only let you edit the prices of single products. Alternatively, a dedicated plugin will also allow you to change the prices of any product in bulk, but you may need to pay for it.
If you have a basic knowledge of spreadsheets, you can export your product data, update the prices, and then import them back to your store. This is an excellent option and isn’t as complicated as it may seem. Finally, you can also change prices programmatically using code snippets that allow you to apply discounts to particular products or the whole cart automatically.
Have you ever tried editing your product prices in bulk? Which method did you use, and how was your experience? Let us know in the comments section below.
If this article was useful, you may be interested in these guides:






















5 comments
Seba
Hi, nice post.
Very useful for anyone that needs to edit prices on bulk fast & easy
By the way, I’d like to note that it is not recommended to interact directly with database, like in your code.
Using WC_Product() class is much better ->https://woocommerce.github.io/code-reference/classes/WC-Product.html
$product = new \WC_Product($id);
$product->set_price($strin);
$product->save();
Also, this other plugin is more specific made for editing prices ->>https://es.wordpress.org/plugins/simplebeat-filter-edit/
Cheers !
Robert
I have a question on the import section (from section 3). I’ve uploaded the changed csv file and checked the box for “update existing products” and proceed to the next step. Map CSV Fields to products, all the Map to Fields are set to Do Not Import, this is repeated at least 40 times. I’m not sure what to do hear. I’m just trying to updated my selling prices by reducing 5%.
When I tried yesterday, I selected regular price, and started import, I landed up with over 3400 black items that I had to delete.
can you help me with this
Muhammad Bilal Khalid
Hi Robert,
That’s quite weird. It’s a straightforward process and should work without any issues. Please make sure that you are following all the steps correctly. If it still doesn’t work for you, try using a plugin as mentioned in the article.
Thanks
Jenn Webb
Thank you very much. It is a great article explaining clearly.
Muhammad Bilal Khalid
Hi Jenn, Thank you so much for your appreciation. I’m glad you found the content helpful 🙂