The following lines of codes will let you redirect all your users to a random post in WordPress.

Snippet Source/Credit: Smashing Magazine