taking a family picture can be a major challenge. when possible my first recommendation is to hire a photographer that you trust to take the family picture for you. but if you're wanting to do it yourself there are a few things to keep in mind to ensure that you get more consistent and successful results.
the first thing to pay attention to is the direction of the light. large multi-family photos are best taken outdoors. avoid shady spots with splotchy light. also avoid direct sunlight, no one is happy with squinty photos. regardless of the time of day you can usually take a successful back-lit photo. just make sure you adjust your exposure for their faces and not for the overall scene. adjusting for the overall scene can result in underexposed photos.
now let's get to the heart of this question: focus. how do you make sure that everyone is in focus? one of the key elements to determine this is aperture. when you have multiple people in an image (more than 4) it's best to have your aperture (or f/stop) be greater than f/4. for even larger family groupings try shooting around f/8. this will ensure (if focused appropriately) that no matter what depth the family members are in the image that they will still be in focus.