Adding the following snippet to your theme’s functions.php file, you will be able to rearrange WordPress categories order.

Snippet Source/Credit: Sebastian