Preheat the oven to 325°F (160°C). Grease and flour a 10-inch bundt pan.
In a large mixing bowl, cream together the softened butter and cream cheese until smooth and creamy.
Gradually add the granulated sugar, beating until light and fluffy.
Add the eggs one at a time, beating well after each addition.
In a separate bowl, whisk together the all-purpose flour, baking powder, and salt.
Gradually add the dry ingredients to the butter mixture, mixing until just combined.
Stir in the vanilla extract, crushed pineapple, chopped pecans, and shredded coconut (if using).
Pour the batter into the prepared bundt pan, spreading it out evenly.
Bake in the preheated oven for 1 hour and 20 minutes, or until a toothpick inserted into the center of the cake comes out clean.
Remove the cake from the oven and let it cool in the pan for 10 minutes. Then, invert the cake onto a wire rack to cool completely.