Summarize this article:

Doing a split can appear deceptively simple. In actuality, this move requires a high level of flexibility in multiple muscle groups. The most important of these are the hamstrings and dorsal hip muscles (also called iliopsoas), however, stretching a wide range of lower-body muscles will ensure greater overall flexibility, lessening your risk of discomfort, pain, or injury. Additionally, this comprehensive stretching regimen prepares you to do both types of basic split - side splits and front splits. Besides the hamstrings and hip muscles, try to add stretches for as many of the following muscles as possible to your fitness routine:  Lower back (lumbar region) Buttocks (glutes) Groin (especially valuable for side splits) Calves Quadriceps The stretching recommendations included the following steps in this section will target many of these secondary muscles. However, if desired, you may substitute your own preferred stretches. This stretch targets your hip muscles. Begin as if you were doing an ordinary lunge exercise - plant one foot forward and lower yourself down to the ground by bending your front leg and sliding your back leg back until your shin lies on the ground. When you've reached the floor, put your hands on your hips and gradually shift your weight forward, keeping your back straight. Continue until you begin to feel the stretch in the top of the thigh where it meets the hip. Hold for 20-30 seconds, then return to your starting position and switch to your other leg. Repeat several times.

Summary:
Know the muscles you need to stretch. Do a lunge stretch.