Magento 2: Recent Order not showing in Sales Order Grid

You place an order from frontend and expect it to be displayed in the Sales -> Orders grid in the Magento backend. But, you don’t see your recent order in the sales order grid.

Table of Contents

Cause

This is because Magento uses Scheduled Grid Updates. The order related grids (order, invoice, shipment, credit memo) are updated via scheduled cron job. This feature is enabled to avoid locks and reduce processing time.

Solution

1) The best solution would be to run the cron job at regular intervals.

You can also run cron manually from the terminal with the following command:


bin/magento cron:run

2) The other solution (not recommended) is to disable asynchronous indexing of the grid.

You can enable/disable it by going to:


STORES > Settings > Configuration > Advanced > Developer > Grid Settings > Asynchronous indexing

Or, from the command line:

Show the value of the setting:


bin/magento config:show dev/grid/async_indexing

Enable Async Grid Indexing:


bin/magento config:set dev/grid/async_indexing 1

Disable Async Grid Indexing:


bin/magento config:set dev/grid/async_indexing 0

Refresh Cache

After the settings change, you have to refresh cache:
– either by going to SYSTEM > Tools > Cache Management
– or running the command bin/magento cache:flush.

Finally

Refresh the sales order grid page in Magento admin.

Finally, you should be able to see your recently added order in the sales order grid.

Hope this helps. Thanks.