The "perfect" set up doesn't really exist but there are some guidelines depending on logic and how the pedals react to one another (some sound better before OD and distortion and some other after).
Your wah always goes first. It reacts better with a clean signal then a distorted one.
The compression goes right after the wah. You don't want to compress your tone at the end of the line but at the beginning and it also reacts nicer with a cleaner signal.
After your compression, you put everything that distorts the sound. Overdrive before or after distortion, doesn't make that much of a difference but try it out.
What sounds better is the right move to do.
After that you put your modulation effect (flanger, chorus, delay). The order will be based on what you think sounds the best but the delay always goes last. You want to create an echo of your full tone, not just a part of it. And it also sounds a lot nicer that way.
If you ever get your hands on a fuzz pedal one day, especially vintage one's or reissue, remember to put it at the very beginning of your chain, before the wah. They tend to react weirdly if there's something between them and the guitar. When I started to build my pedal board I had a fuzz face after the wah and the OD and I used to think it was the worst pedal. It made so much unwanted noise.
Then I read somewhere what I just told you and it fixed everything. Fuzz's are great but you need to learn it first. They also show all your flaws in your playing (especially the big muff), witch is good and sucks at the same time.
Hope this helps you.