In addition to using rot-resistant materials, there are several important considerations when installing a wooden gate post. The post must be plumb and buried deeply enough to withstand lateral pressure of the hanging gate. The bottom of the post must be buried deeply enough to keep the post from shifting, caused by frost heave. Drainage must be provided to prevent rotting at the base of the post. When installing a gate post, typically at least 1/3 of the overall length of the post is buried in the ground.
Contact your local building code-enforcement office to determine the recommended minimum depth to bury the gate post. Designate one end of the post as the top. Calculate the post's minimum overall length by multiplying the desired height of the installed post by 1.5. Measure and mark the top portion of the post to indicate the ground level. Measure down from the ground level and mark the recommended burial depth of the post. Saw the post to trim at the lowest mark on the gate post.
Dig the post hole to a depth of the underground portion the post plus 6 inches. Use a posthole digger to dig the post hole, two and a half to three times as wide as the post. Flare the bottom of the hole slightly, so it is bell-shaped. Pour a couple inches of gravel into the hole tamp it with the handle of a shovel. Continue adding gravel, tamping and measuring the depth of the hole until it is the same depth as the distance between the ground-level mark and the bottom of the post.
Place the bottom centre of the post in the hole, oriented to align with your fence posts. Fill the hole about one-third full of dry concrete mix. Add water to wet, but not saturate the concrete. Use a carpenter's level to plumb the post. Add more concrete mix and water so the hole is about two-thirds-full. Re-plumb the post. Fill the hole with concrete, then water. Re-check for plumb one last time. Allow the concrete to dry and harden, according to manufacturer's instructions, before installing the gate on the post.