“Focus Stacking” is a method to get most if not all of an image in focus. It is often used very successfully in macro photography because macro lenses have by nature a shallow depth of field. In order to get the entire image sharp one can mount the camera on a rail (you can get a cheap camera rail for under $20 on Ebay). One can focus on the closest part of the subject towards the camera and one can take the first exposure. The one can move the camera half a centimeter and take the next exposure and so forth. All the images need to be combines in post production. There are many videos on youtube.com where one can learn easily to stack images either in Photoshop or other software.
This is a tree trunk. I focused on the left hand side of the tree first and created my first images. Then I moved the camera on the railing keeping the same exposure setting and took my next shot. I continued moving the camera and creating images until I had the left hand side of the tree trunk in focus or almost in focus. Then I combines the images in post production.
Enjoy and keep on working on your images!