Automatically removing outdated products: rules and strategies
-
Roman Howler
Copywriter Elbuz
Why remove outdated products?
Outdated products in the catalog create numerous problems for online stores. They clutter the product range, degrade the user experience, reduce conversions, and negatively impact SEO. Customers lose trust in the store when they regularly encounter out-of-stock products.
Manual catalog cleaning is time-consuming, especially for stores with a large inventory. Automating the process of removing outdated products allows you to keep your catalog up-to-date without constant manager intervention.
A properly configured automatic deletion system helps:
- Reduce the number of pages with 404 errors
- Improve behavioral indicators
- Increase the speed of indexing relevant products
- Optimize search engine crawl budget
- Reduce the load on the server and database
Criteria of irrelevance
Before setting up automatic deletion, it's important to clearly define the criteria by which a product is considered obsolete. The key parameters for evaluation are:
Out of stock
An item that is out of stock for a certain number of days (usually 30-90 days) can be considered out of stock. The timeframe depends on the specific product category and the supply cycle.
Lack of sales
If a product hasn't sold for 90-180 days, even if it's in stock, this indicates low demand. Such products are candidates for deletion or a revision of the pricing strategy.
Discontinued
Products that the manufacturer or supplier no longer produces and that have not been included in price lists for more than 60 days should be deleted or archived.
Combined conditions
The most effective approach is to use several criteria simultaneously:
- Out of stock for over 60 days AND no sales in the last 90 days
- Out of stock at all suppliers for over 45 days and low page traffic
- Zero balance for more than 30 days and the product is discontinued
It's important to consider the seasonality of products. For example, Christmas decorations shouldn't be removed in the summer if they've been out of stock for several months.
Soft delete vs. hard delete
There are two main approaches to removing products from your catalog, each with its own advantages and disadvantages.
Soft delete
With a soft delete, the product is marked as deleted in the database but remains physically in the system. The page becomes inaccessible to customers, but the data is preserved.
Advantages:
- Possibility of quick restoration of goods upon resumption of deliveries
- Saving sales history and statistics
- Easy to roll back changes in case of mistaken deletion
- Possibility of analyzing deleted products
Flaws:
- Increasing the size of the database
- The need to filter deleted records in queries
- Potential performance degradation at high volumes
Hard delete
Complete physical deletion of a product record from the database. All product data is permanently deleted.
Advantages:
- Saving disk space
- Simplifying the database structure
- Improving query performance
- Complete system cleanup of obsolete data
Flaws:
- Impossibility of restoring a product with history
- Loss of statistical data
- Risk of mistaken deletion
Recommendation: The optimal strategy is a combined approach. First, apply a soft delete for 30-60 days, then archive or hard delete items that are no longer relevant.
Archiving of goods
Archiving is an intermediate step between an active catalog and complete deletion. This is especially important for stores with a wide product range and frequent changes.
Archive structure
Archived items are stored in a separate table or marked with a special status. They are not displayed in the catalog but are available for viewing by administrators.
Archiving rules
- Products with a sales history of more than 5 units are stored in the archive for at least 1 year.
- Items with no sales are archived for 3-6 months before being permanently deleted.
- Seasonal items are archived until the next season.
- Products with external links and backlinks are archived with the URL preserved.
Automatic recovery from archive
Set up rules for automatically restoring items from the archive under certain conditions:
- The product appears in the supplier's new price list
- Receipt of balances to the warehouse
- Start of the season for seasonal goods
- Request from a client via the feedback form
301 redirects for SEO
Properly setting up redirects is critical to maintaining SEO rankings and preventing traffic loss when products are removed.
Redirect strategies
By product category
The most universal option is redirection to the parent category. The user is taken to the relevant section of the catalog, where they can find alternatives.
301 redirect: /product/samsung-galaxy-s20 → /category/smartphonesFor a similar product
If there is a direct replacement or updated model, redirecting to a specific product yields better conversion.
301 redirect: /product/iphone-12 → /product/iphone-13To the special page
For high-traffic products, create a page with alternative offers and an explanation of why they are unavailable.
Automated redirects
Set up automatic redirect creation rules:
- When deleting a product from a single-product category, a redirect to the category at the next higher level is issued.
- If there is a substitute product in the attributes, redirect to the substitute
- In the absence of an explicit replacement, redirect to the category
- For products without incoming traffic, you can use 410 Gone
Redirect Monitoring
Check the effectiveness of redirects regularly:
- Monitor redirect chains and eliminate them
- Analyze the bounce rate on redirect recipient pages
- Check Google Search Console data for 404 errors
- Remove redirects older than 1 year with minimal traffic
Recovering deleted items
Even with automated deletion, a product recovery mechanism is essential. This protects against errors and allows for quick response to changing conditions.
Rollback period
Set the period during which deleted items can be restored with one click:
- 0-7 days: full recovery with all data and directory position
- 7-30 days: recovery from soft delete with history preserved
- 30-90 days: recovery from archive, data update required
- Over 90 days: Create a new product with historical data import
Automatic recovery
Set up triggers for automatic recovery:
- Appearance in the price list: The product is available again from the supplier.
- Receipt of balances: A new batch has arrived at the warehouse
- High demand: Multiple queries via the search form
- Seasonality: The season for selling goods has arrived
Logging changes
Keep a detailed log of all deletion and recovery operations:
- Date and time of operation
- Product ID and name
- Reason for deletion (by what criterion it worked)
- Author of the operation (system or user)
- Product parameters at the time of deletion
Examples of setup for different CMS
WooCommerce (WordPress)
To automate deletion in WooCommerce, use plugins or your own code:
// Soft deletion of products without leftovers for more than 60 days function auto_archive_out_of_stock_products() { $args = array( 'post_type' => 'product', 'posts_per_page' => -1, 'meta_query' => array( array( 'key' => '_stock_status', 'value' => 'outofstock' ) ) ); $products = get_posts($args); $days_threshold = 60; foreach ($products as $product) { $out_of_stock_date = get_post_meta($product->ID, '_out_of_stock_date', true); if ($out_of_stock_date) { $days_out = (time() - strtotime($out_of_stock_date)) / (60 * 60 * 24); if ($days_out > $days_threshold) { wp_update_post(array( 'ID' => $product->ID, 'post_status' => 'draft' )); } } } }Shopify
In Shopify, automation is implemented through Shopify Flow:
- Trigger: Inventory level changed
- Condition: Inventory quantity = 0 AND Last sale > 90 days ago
- Action: Update product status to Draft
- Action: Add tag "auto-archived"
Magento 2
Create a cron job to periodically check and archive:
// app/code/Vendor/Module/Cron/ArchiveProducts.php public function execute() { $days = 90; $dateThreshold = date('Ymd H:i:s', strtotime("-{$days} days")); $collection = $this->productCollectionFactory->create() ->addAttributeToFilter('status', Status::STATUS_ENABLED) ->addFieldToFilter('qty', array('lteq' => 0)) ->addFieldToFilter('updated_at', array('lteq' => $dateThreshold)); foreach ($collection as $product){ $product->setStatus(Status::STATUS_DISABLED); $product->setCustomAttribute('archived_at', date('Y-m-d H:i:s')); $this->productRepository->save($product); $this->setupRedirect($product); } }PrestaShop
Use an automation module or create a script:
// modules/autoarchive/autoarchive.php $sql = 'UPDATE '._DB_PREFIX_.'product SET active = 0 WHERE id_product IN ( SELECT id_product FROM '._DB_PREFIX_.'stock_available WHERE quantity = 0 AND date_upd< DATE_SUB(NOW(), INTERVAL 60 DAY) )';Conclusion
Automatically removing outdated products is an important element of online store catalog management. A properly configured system allows you to keep your inventory up-to-date without constant manual monitoring.
Key principles of effective automation:
- Use a combination of criteria to determine irrelevance
- Use a step-by-step approach: soft delete → archive → hard delete
- Set up 301 redirects to maintain SEO rankings
- Provide mechanisms for product recovery
- Consider seasonality and specific product categories
- Keep detailed logs of all operations
Regularly analyze the effectiveness of your configured rules and adjust parameters based on statistics. A proper strategy for removing irrelevant products improves user experience, increases conversion, and optimizes search engine performance.
For comprehensive assortment management, we recommend that you study our complete instructions for warehouse and inventory management.
Related materials
Save a link to this article
Roman Howler
Copywriter ElbuzMy path is the road to automating success in online trading. Here words are weavers of innovation, and texts are the magic of effective business. Welcome to my virtual world, where every idea is the key to online prosperity!
Discussion of the topic – Automatically removing outdated products: rules and strategies
Automatically removing outdated products: rules and strategies
There are no reviews for this product.


Write a comment
Your email address will not be published. Required fields are checked *