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:

  1. Go to your WordPress admin dashboard
  2. Navigate to WP Engine → General Settings
  3. Look for the ORDER_BY_RAND option and enable it
  4. Save your changes

For more details, see WP Engine's documentation on 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.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us