I have an entranceway between my house and a wall. There's a concrete walk in the center with small patches of dirt on each side. I want to put a wooden gate across with the posts sunk in the dirt. This morning I dug down on the wall (hinge) side and hit the wall's footings 9" down. The above-ground height is 45", so I was hoping to get down 24". I also read two experts' opinions that concrete isn't necessary and can increase the chance of rot. I'm using cedar 4x4s and planning on attaching them to the walls (stucco) with lag bolts. I'm in Southern California, so no frost line. I estimate the gate will weigh 35-40 pounds. My question is: if I pack the post in gravel and bolt it to the wall, will 9" be deep enough to keep the post level?
The really professional way is to set a bracket in concrete, then bolt-through the posts to the brackets. While slightly more $ (cost of bracket and bolt) and more effort, this will give you a long life solution that is easy to maintain over time. The concrete for the bracket should be 24-30" deep, 8" diameter for posts of this size.
Setting the post in concrete will give longer life than simply setting teh post in the dirt. It is good to slope the top of the concrete away from the wood post so that rain does not puddle next to the post.
Some of us (who have been doing this for years) now also trim the top of the post at an angle, so that water is more likely to run off the top of the post rather than puddle.