WooCommerce: How to Remove Products (The Easy Guide for Beginners)
So, you’re running a WooCommerce store. Great! But sometimes, products need to go. Maybe you’re discontinuing a line, a product is out of stock forever, or you just made a mistake and need to clean things up. Don’t worry! Removing products in WooCommerce is straightforward. This guide will walk you through the process, step-by-step, ensuring you don’t accidentally break anything.
Think of it like cleaning your physical store. You wouldn’t want to leave outdated merchandise cluttering your shelves, right? The same goes for your online store. Keeping your product catalog tidy and relevant improves the customer experience and can even boost your SEO!
Why Remove Products?
Before we dive in, let’s quickly recap why you might want to remove products from your WooCommerce store:
- Discontinued Products: The most common reason. The product is no longer available, and selling it is impossible.
- Out of Stock (Permanently): If you know you’ll never restock an item, removing it is better than leaving customers disappointed.
- Seasonal Items: Think holiday decorations or summer apparel. Removing them after the season ends keeps your store current.
- Mistakes: We all make them! Sometimes you might accidentally add the wrong product or with incorrect information.
- Improving Conversions: A smaller, more curated catalog can sometimes lead to higher conversion rates. Customers aren’t overwhelmed with choices.
- Compliance or Legal Reasons: Sometimes, you may be required to remove a product due to legal or compliance issues. Think of items that have been recalled.
- Set Product Status to “Draft”:
- Change Product Visibility:
- Using a WooCommerce Plugin: There are numerous plugins that offer more advanced product visibility options, such as hiding products based on user roles or categories. This is particularly helpful for wholesale stores or membership sites.
How to Delete a Single Product in WooCommerce
This is the simplest and most common scenario. Let’s say you’re discontinuing a specific T-shirt design. Here’s how to remove it:
1. Log in to your WordPress Admin Dashboard. This is usually yourdomain.com/wp-admin.
2. Navigate to Products > All Products. You’ll see a list of all your products.
3. Hover over the product you want to remove. A few options will appear.
4. Click “Trash”. The product is now moved to the Trash, similar to the Recycle Bin on your computer.
Important: Trashing the product doesn’t permanently delete it. It’s still accessible if you Explore this article on How To Modify Woocommerce Email Template change your mind.
5. (Optional) Permanently Delete from Trash: If you’re absolutely sure you want to delete the product forever, go to Products > Trash. Hover over the product and click “Delete Permanently”. This action is irreversible!
How to Delete Multiple Products in WooCommerce (Bulk Actions)
If you need to remove a bunch of products, doing it one by one is tedious. Luckily, WooCommerce has a bulk action feature. Imagine you’re clearing out an entire old product line.
1. Go to Products > All Products.
2. Select the products you want to remove. Check the boxes next to each product.
3. From the “Bulk actions” dropdown menu, select “Move to Trash”.
4. Click “Apply”. All selected products are moved to Learn more about How To Remove Built With Woocommerce In Email the Trash.
5. (Optional) Permanently Delete Learn more about How To Disable Woocommerce Cart Multiple Products: Go to Products > Trash. Check the boxes next to the products you want to permanently delete. Select “Delete Permanently” from the “Bulk actions” dropdown and click “Apply”. Again, be careful with this!
Hiding Products Instead of Deleting
Sometimes, you might not want to completely delete a product. Maybe you plan to bring it back in the future, or you want to keep the historical data. In this case, hiding the product is a better option.
There are several ways to hide a product:
1. Edit the product.
2. In the “Publish” meta box on the right-hand side, change the “Status” from “Published” to “Draft”.
3. Click “Update”.
The product will no longer be visible on your storefront, but it remains in your database.
1. Edit the product.
2. In the “Publish” meta box, click “Edit” next to “Visibility”.
3. Choose “Hidden” and click “OK”.
4. Click “Update”.
This option allows you to choose who can see the product (e.g., only users with a direct link).
Code Example: Programmatically Removing Products
For more advanced users, you can remove products using code. Use this method with caution, and always test your code in a staging environment first. Incorrectly removing products can lead to data loss.
This example uses a simple WordPress hook to delete a product based on its ID:
function remove_product_by_id( $product_id ) { wc_delete_product( $product_id, true ); // 'true' permanently deletes the product }
// Example: Remove product with ID 123
remove_product_by_id( 123 );
Important:
- This code needs to be added to your theme’s `functions.php` file or a custom plugin.
- Replace `123` with the actual ID of the product you want to remove. You can find the product ID by hovering over the product title in the “All Products” list. The URL in the bottom-left corner of your browser will contain the ID.
- `wc_delete_product( $product_id, true )` permanently deletes the product. If you only want to move it to the Trash, change `true` to `false`.
- Use with EXTREME caution and only when absolutely necessary!
Remember to remove the code after it has run to prevent accidental deletions.
SEO Considerations When Removing Products
Removing products can impact your SEO if you’re not careful. Here are a few things to keep in mind:
- Discover insights on How To Bundle Woocommerce Shipping
- 301 Redirects: If a product page has generated significant traffic or backlinks, consider implementing a 301 redirect to a similar product or category page. This tells search engines that the page has permanently moved and helps preserve your SEO ranking. Use a plugin like “Redirection” to easily manage redirects.
For example, if you’re discontinuing a specific blue T-shirt, redirect the old product page to your general “T-Shirts” category or a similar blue shirt.
- 404 Errors: Avoid 404 errors (page not found). If you don’t redirect, make sure your site has a custom 404 page that guides users back to your store.
- Inform Search Engines (Google Search Console): You can use Google Search Console to tell Google that a page has been removed. This helps speed up the indexing process and prevent your site from showing outdated products in search results.
Conclusion
Removing products from your WooCommerce store is a common task. By following these steps, you can keep your online store clean, up-to-date, and SEO-friendly. Remember to choose the right method – deleting, hiding, or using code – based on your specific needs. Always be cautious when permanently deleting products, and consider the SEO implications of your actions. Happy selling!