Preheat your oven: Preheat the oven to 350°F (175°C). Grease and flour a 9x13-inch baking pan or two 9-inch round cake pans.
Mix the dry ingredients: In a large mixing bowl, whisk together the flour, sugar, baking powder, baking soda, and salt until well combined.
Prepare the wet ingredients: In another bowl, mix together the drained crushed pineapple, shredded coconut, melted butter, coconut milk, eggs, and vanilla extract until evenly combined.
Combine wet and dry ingredients: Gradually add the wet ingredients to the dry ingredients, stirring until just combined. Be careful not to overmix.
Bake the cake: Pour the batter into the prepared baking pan(s) and smooth the top with a spatula. Bake in the preheated oven for 25-30 minutes, or until a toothpick inserted into the center comes out clean. If using two round pans, reduce baking time to about 20-25 minutes.
Cool the cake: Allow the cake to cool completely in the pan before frosting.
Make the frosting: In a mixing bowl, beat together the softened butter and cream cheese until smooth and creamy. Gradually add the powdered sugar and vanilla extract, beating until the frosting is light and fluffy.
Frost the cake: Once the cake has cooled, spread the frosting evenly over the top and sides of the cake.
Toast the coconut: Spread the shredded coconut on a baking sheet and toast it in the oven at 350°F (175°C) for about 5-7 minutes, or until lightly golden brown. Keep an eye on it to prevent burning.
Decorate: Sprinkle the toasted coconut over the frosted cake for a beautiful and delicious finishing touch.
Serve and enjoy: Slice the cake and serve it to your guests, or simply indulge in a slice yourself! Enjoy the tropical flavors of pineapple and coconut in every bite.