Step 1: Preheat Oven u0026 Prepare Pans : Preheat oven to 350°F (175°C). Grease and flour two 9-inch round cake pans and line with parchment paper.
Step 2: Mix Dry Ingredients : In a medium bowl, whisk together flour, baking powder, baking soda, cinnamon, nutmeg, ginger, and salt. Set aside.
Step 3: Mix Wet Ingredients : In a large bowl, beat together sugar, oil, and eggs until smooth. Add vanilla extract and mix well.
Step 4: Combine Wet and Dry Ingredients : Gradually add dry ingredients to wet mixture, mixing until just combined. Fold in grated carrots, nuts, pineapple, and coconut if using.
Step 5: Bake the Cake : Divide batter evenly between prepared pans. Bake for 35–40 minutes, or until a toothpick inserted in the center comes out clean. Cool cakes in pans for 10 minutes, then transfer to a wire rack to cool completely.
Step 6: Prepare Cream Cheese Icing : In a large bowl, beat cream cheese and butter until smooth and creamy. Gradually add powdered sugar, 1 cup at a time, beating until desired sweetness and consistency.
Beat in vanilla extract and a pinch of salt.
Step 7: Assemble and Frost Cake : Place one cake layer on a serving plate. Spread a thick layer of cream cheese icing evenly over the top. Place the second layer on top and frost the top and sides of the cake. Garnish with chopped nuts, grated carrot, or a dusting of cinnamon.
Step 8: Serve : Slice into 12–16 pieces and serve at room temperature. Perfect alongside coffee, tea, or a scoop of vanilla ice cream.