Coconut Cake Recipe
Layers of moist buttery yellow cake and creamy coconut pastry cream with cream cheese frosting. Sprinkled with sweetened white flaky coconut.
Was this page helpful?
Help improve this recipe for others.
Send this recipe to your inbox.
We'll email it straight to you - plus weekly cooking inspiration.
Ingredients
Some product links may be affiliates. If you buy through them, you're supporting the site and Pekin may earn a commission at no extra cost to you.
Yellow Cake
Coconut Pastry Cream
Cream Cheese Frosting
Assembly & Garnish
Method
Yellow Cake
- 1
Prepare and preheat
Preheat oven to 350°F (175°C). Grease and flour two 9-inch round cake pans (or three 8-inch pans) and line bottoms with parchment. Allow pans to come to room temperature if refrigerated.
- 2
Dry ingredients
In a medium bowl whisk together 3 cups all-purpose flour, 2 tsp baking powder, and 1 tsp fine salt. Set aside.
- 3
Cream butter and sugar
In the bowl of a stand mixer fitted with the paddle (or using a handheld mixer), beat 1 cup softened unsalted butter and 2 cups granulated sugar on medium-high speed until pale and fluffy, about 3–4 minutes.
- 4
Add eggs
Add the 4 large eggs one at a time, beating briefly after each addition until incorporated. Scrape the bowl as needed so the mixture is smooth.
- 5
Incorporate dry and wet
Reduce mixer speed to low. Add one-third of the dry mixture, then half of 1 cup whole milk, then another third of the dry mixture, then the remaining milk, then the last third of the dry mixture. Mix just until combined. Add 2 tbsp vegetable oil and 2 tsp vanilla extract and mix until smooth. Do not overmix.
- 6
Bake
Divide batter evenly between prepared pans. Smooth tops and bake in preheated oven 25–30 minutes for 9-inch pans (or 20–25 minutes for 8-inch pans), until a toothpick inserted in the center comes out clean or with a few moist crumbs and the cake springs back lightly.
- 7
Cool
Allow cakes to cool in pans on a wire rack for 10–15 minutes. Run a knife around edges, invert onto racks, remove parchment, and cool completely before filling and frosting (about 1–2 hours). If in a hurry, chill for 30–45 minutes to firm crumb for easier slicing.
Coconut Pastry Cream
- 8
- 9
Mix dry and yolks
In a medium bowl whisk together 1 cup granulated sugar and 1/4 cup cornstarch until uniform. Add 4 large egg yolks and whisk until smooth and slightly thickened.
- 10
Temper and thicken
Strain the infused milk through a fine-mesh sieve into a clean saucepan, pressing on solids to extract liquid (reserve solids if you want to fold some coconut bits into the cream). Reheat the strained milk until warm. Slowly pour about one-third of the warm milk into the yolk-sugar mixture while whisking constantly to temper the eggs. Pour tempered mixture back into the saucepan with the remaining milk and return to medium heat, whisking constantly until the mixture thickens and comes to a gentle boil, about 2–4 minutes. Once thickened to a pudding-like consistency, cook and whisk for another 30 seconds to cook out the starch taste.
- 11
Finish pastry cream
Remove from heat, whisk in 3 tbsp unsalted butter, 1 tsp vanilla extract, and a pinch of salt until butter is melted and incorporated. If you reserved some coconut bits and want texture, stir in 1/2–3/4 cup of the strained shredded coconut now. Transfer pastry cream to a shallow bowl, press plastic wrap directly onto the surface to prevent skin from forming, and refrigerate until thoroughly chilled, at least 2 hours.
Cream Cheese Frosting
- 12
Beat butter and cream cheese
In a mixing bowl beat 8 oz softened cream cheese and 1 stick (1/2 cup) softened unsalted butter on medium speed until smooth, about 1–2 minutes.
- 13
Add sugar and vanilla
Reduce speed to low and gradually add 3 cups confectioners' sugar, about 1 cup at a time, mixing until combined. Add 1 tsp vanilla extract and a pinch of salt, then increase speed to medium and beat until the frosting is creamy and spreadable, about 1 minute. If frosting is too soft, chill 15–20 minutes and re-whip briefly.
Assembly & Garnish
- 14
Toast coconut
Spread 2 cups sweetened flaked coconut in an even layer on a baking sheet. Toast in a 325°F (160°C) oven 6–8 minutes, stirring once, until golden brown. Watch closely to avoid burning. Remove and cool completely.
- 15
Level and optionally brush
If cake layers have domes, level tops with a serrated knife to create flat layers. If using, lightly brush each cake layer with up to 1/4 cup simple syrup to add moisture.
- 16
Fill with pastry cream
Place first cake layer on serving plate or cake board. Pipe or spread a thick, even layer (about 3/4 to 1 cup) of chilled coconut pastry cream over the layer, leaving a 1/2-inch border from the edge to allow the frosting to seal. Repeat with second layer. If you have three layers, distribute cream between layers accordingly.
- 17
Crumb coat and chill
Apply a thin crumb coat of cream cheese frosting (about 1/3 of the frosting) around the sides and top to seal crumbs. Chill the cake 20–30 minutes to set the crumb coat.
- 18
Final frost and decorate
Use remaining frosting to frost the top and sides smoothly or with a decorative finish. While frosting is still soft, press toasted coconut onto the sides and sprinkle additional coconut on top as desired. For an even finish, gently press the coconut into the frosting with your hands or a spatula.
- 19
Set and serve
Refrigerate the assembled cake at least 1 hour to allow pastry cream to set and flavors to meld. Remove from refrigerator 20–30 minutes before serving for best texture. Store leftover cake covered in refrigerator up to 4 days.