Installing a fence is a labour intensive task and if you aren't careful you'll end up with a crooked fence over time. Quality installation is the key to keeping fence posts straight and avoiding a sagging fence that could be worsened by livestock, bumps from vehicles, or long periods of rain or drought. While the height and width of your fence posts will vary by project, you can use the same basic principles for installing them to keep them straight.
Dig the hole for your fence post as deep as a third of your post's length plus 6 inches with a posthole digger or shovel. Keep the hole as narrow as possible for the best support. Pat the earth forcefully along the inside of the hole to pack it in.
Add gravel or concrete to the hole, or a combination of the two, and fill it 6 inches deep. Let the concrete set up slightly (if using it) so it is firm, but not fully solid or still runny. The time this takes will depend on the brand of concrete and weather, but set up should begin after one to three hours.
Slip your post into the hole and into the gravel or concrete. The concrete should be firm enough to hold the post up without it tipping over. Wiggle the post as needed to secure it in the gravel or push out air bubbles from the concrete.
Tie one end of each string to the post about three feet up from ground level so the strings run away from one another in three different directions. Tie the other end of each string to a stake.
Pull each stake in different directions to add tension to the string and push the stake into the ground by hand. Check the post with a level to see which strings need to have more tension added to them either by pulling the stake further back or by winding the string on the stake to take up slack.
Use a mallet to anchor the stakes into the ground sufficiently once you have positioned the fence post straight up and down. Let the post sit like this for a day as the concrete sets up. If no concrete was used, continue to the next step.
Fill in the remaining space of the hole around the post with the loose dirt from where it was dug. Pack the soil in tightly without disturbing the alignment of the post. Cover the area around the base of the post with a short 3-inch tall mound of soil and gravel to encourage rain water to flow away from the base of the post. Remove the stakes and strings.
Applying a wood stain to the entire length of the fence post or at least to the portion that will be underground can help prolong the life of the fence and make your work to keep it straight worthwhile. If you have the time after Step 1, fill the hole halfway with water and keep track of how much time it takes for it to drain. If the water seems to drain away very quickly, then use more gravel and concrete than directed.