Out-of-stock products at the end of the category

Products that are out of stock move to the end of the list by themselves. Customers first see what they can buy.

⏱ 3 minBeginnerUpdated 8 Oct 2026

When a product is out of stock, the shop automatically places it after the in-stock products in the category and in search results. You do not need to arrange anything by hand.

When a product is out of stock

A product counts as out of stock when Stock Status is set to Out of Stock. The shop sets this by itself when an order brings the quantity down to 0.

Quantity and Stock Status fields in the product form
  1. Quantity - how many items you have.
  2. Stock Status - In Stock or Out of Stock.

When the product is back, enter the new quantity and set Stock Status to In Stock. The product returns to its place among the others.

Show or hide out-of-stock products

Stores › Configuration › Catalog › Inventory

  1. Expand the Stock Options section.

  2. For Display Out of Stock Products, first untick Use system value, otherwise the field is locked. Then choose Yes if out-of-stock products should stay visible at the end of the list, or No if they should be hidden.

    Display Out of Stock Products setting in the Stock Options section
    First untick Use system value on the right, then choose Yes or No in the field.
  3. Click Save Config and flush the cache.

Moving products to the end only works when out-of-stock products are displayed (Yes). With No, customers do not see them at all.
Visible out-of-stock products are not lost: customers see what you sell, and the page stays in Google. When the product is back in stock, it is right back near the top.
Was this article helpful?

Related