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

Snippet Source/Credit: Sebastian