Preheat your oven to 350°F (175°C) and grease a 9x13-inch baking pan with butter or non-stick spray. Dust lightly with flour to prevent sticking.
In a medium bowl, whisk together the flour, baking soda, and salt. Set aside.
In a large mixing bowl, beat the butter and sugar with an electric mixer until light and fluffy.
Add the eggs one at a time, mixing well after each addition. Stir in the vanilla extract.
Gradually alternate between adding the dry ingredients and buttermilk to the butter mixture. Mix until just combined.
Fold in the shredded coconut and chopped pecans gently.
Pour the batter into the prepared pan and spread it evenly. Bake for 20–25 minutes or until a toothpick inserted into the center comes out clean.
Allow the cake to cool completely in the pan before frosting.
To make the frosting, beat the cream cheese and butter together until smooth. Gradually add the powdered sugar, one cup at a time, and mix until fluffy. Stir in the vanilla extract.
Spread the frosting evenly over the cooled cake. Top with toasted coconut and chopped pecans for garnish.
Slice, serve, and enjoy!