---
title: "Random sorting not working on WP Engine"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview/common-problems/random-sorting-not-working-on-wp-engine/"
---

If you've configured your View to use random sorting but entries always appear in the same order, your hosting provider may be blocking the `ORDER BY RAND()` MySQL function.

## WP Engine

WP Engine disables `ORDER BY RAND()` by default. Instead of randomizing results, they replace it with `ORDER BY 1` , which returns entries in a fixed order.

To enable random sorting on WP Engine:

- Go to your WordPress admin dashboard
- Navigate to **WP Engine → General Settings**
- Look for the **ORDER\_BY\_RAND** option and enable it
- Save your changes

For more details, see [WP Engine's documentation on ORDER BY RAND()](https://wpengine.com/support/about-order-by-rand/).

### Note about caching

Even with `ORDER BY RAND()` enabled, WP Engine's page caching (Evercache) will cache your page for up to 10 minutes. This means visitors may see the same random result during that window. This is expected behavior and ensures good site performance.

## Other managed hosting providers

Other managed WordPress hosts may have similar restrictions for performance reasons. If random sorting isn't working on your site, check with your hosting provider to see if they disable or limit `ORDER BY RAND()` queries.