To prevent soil compaction around tree roots, avoid heavy foot traffic and machinery near the base of the tree. Consider using mulch to protect the soil and roots, and aerate the soil periodically to improve drainage and air circulation.