Add all ingredients to a medium saucepan over medium heat. Cook until the sugar is dissolved, stirring occasionally. Let the syrup cool until it reaches room temperature or is just slightly warm.
For the Cake:
Preheat the oven to 325F. Butter and flour the inside of a 9 by 13-inch cake pan.
Whisk together the flour, baking soda, cinnamon, salt, and nutmeg in a large bowl. In a separate large bowl, whisk together the sugar, eggs, oil, buttermilk, vanilla, and crushed pineapple (with juices). Whisk in the shredded carrot. Add the dry ingredients to the wet and stir just to combine, being careful not to over-mix. Stir in the coconut and pecans.
Pour the batter into the prepared pan and spread it out evenly. Bake until a toothpick inserted in the center comes out clean, about 40 to 50 minutes.
While the cake is still hot, poke holes all over the top with a fork or wooden skewer. Pour the cooled cake syrup over the hot cake. Let the cake cool to room temperature, and then refrigerate to chill, about 2 hours.
For the Cream Cheese Frosting:
When the cake is almost fully cooled, make the frosting. Add all ingredients to a large bowl. Use a handheld electric beater to mix until light and fluffy.
To Frost the Cake:
Once the cake is cooled, spread the frosting on top.
Before serving, refrigerate for 30 minutes so the frosting can set.
Recipe Yield and Serving Size: This recipe makes 1 (9 by 13-inch) cake. I usually cut it into 15 pieces (I make 2 cuts the long way and 4 cuts across, which yields 15 slices). It's a very rich and decadent cake, so feel free to cut the slices smaller if you prefer.
Cake Syrup: Don’t skip the cake syrup. This is the ace-up-our-sleeves that ensures our carrot cake is moist every time. And bonus, it helps the cake taste fresh for longer!
Pineapple: If you think you don’t like pineapple in carrot cake, try this recipe. You won’t be able to pull out the flavor of pineapple, but it adds a fruity sweetness with a touch of tang. And it also helps keep our cake moist.
Shred Fresh Carrots: I know you can buy pre-shredded carrot. But unfortunately, this cake isn’t the place to do it. Only freshly-grated carrot will melt beautifully into this cake the way we want it to.
Preparing the Cake Pan: Yes, you really do need to butter and flour the cake pan.
Storage: You can store carrot cake covered with plastic wrap in the fridge for up to 1 week.