Preheat oven to 350°F (175°C). Grease and flour a 9x13-inch pan or two 9-inch round pans.
In a large bowl, cream butter and sugar together until light and fluffy.
Add eggs one at a time, beating well after each addition.
In another bowl, whisk flour, baking soda, and salt.
Gradually add dry ingredients to the butter mixture alternately with buttermilk, mixing just until combined.
Stir in vanilla, shredded coconut, and toasted pecans.
Pour batter into prepared pan(s).
Bake 35–40 minutes for 9x13, or 25–30 minutes for rounds, until a toothpick inserted in the center comes out clean.
Let cool completely before frosting.
In a saucepan, melt butter over medium heat.
Stir in brown sugar and milk, cooking until mixture comes to a gentle boil.
Remove from heat and stir in vanilla, coconut, and pecans.
Let cool slightly until thickened but still spreadable.
Spread frosting evenly over cooled cake (either in the pan or on layered rounds).
Garnish with extra pecans or toasted coconut if desired.