Managing Depth of Field in Macro and Close-Up Photography
High levels of magnification mean that your depth of field naturally becomes more shallow than normal. That might be fine when you really want to emphasize your subject, but if you want more depth of field, you need to adjust.
If you want to use a shallow depth of field to create a composition with selective focus (only one spot in the image appears in sharp focus), then you can use a large aperture setting (such as f/2.8). Your focusing has to be precise in this situation so it appears exactly where you want it. Use a tripod to stabilize the camera; doing so ensures that your point of focus doesn't move after you've set it. A focusing rail (device that enables you to move the camera with precision toward and away from your subject) can help to manage your point of focus.
If you want instead to maximize your depth of field, then you need a small aperture (such as f/22). This type of aperture lets in a small amount of light and requires you to use slower shutter speeds in order to expose your scene properly. A tripod helps to keep the camera steady during the exposure, eliminating the motion blur that camera shake causes.