Chef John's Carrot Cake
This is my old and trusty recipe for carrot cake, revamped with coconut oil this time. Use more carrots for a moister cake. If you want to decorate it with candied carrots, simply slice them thinly and boil for a couple minutes in a syrup made from equal parts sugar and water.
all-purpose flour
2
cups
salt
1
teaspoon
baking soda
1
teaspoon
baking powder
2
teaspoons
ground ginger
½
teaspoon
ground cinnamon
2
teaspoons
white sugar
2
cups
eggs
4
large
unsalted butter
¼
cup
coconut oil
1
cup
finely grated carrots, or more to taste
2
cups
finely crushed pineapple, drained
1
(8 ounce) can
finely chopped pecans (Optional)
½
cup
finely chopped walnuts (Optional)
½
cup
cream cheese, softened
1
(8 ounce) package
unsalted butter, softened
¼
cup
vanilla extract, or to taste
1 ½
teaspoons
confectioners' sugar, or to taste
3
cups
 Preheat the oven to 350 degrees F (175 degrees C).
  Place flour in a bowl. Add salt, baking soda, and baking powder. Sprinkle in ground ginger and cinnamon. Whisk thoroughly until combined. Set aside.
  Add sugar to a separate bowl. Whisk in eggs until mixture is smooth and pale yellow, 2 to 3 minutes.
  Heat butter and coconut oil in a saucepan over low heat until just melted but not too hot. Whisk into the bowl with the eggs and sugar until well combined. Add carrots, crushed pineapple, pecans, and walnuts. Stir well.
  Stir flour mixture into the carrot mixture until no dry spots remain. Pour batter into a greased 9x13-inch baking pan. Tap the pan against your counter to let any big air bubbles rise to the surface.
  Bake in the preheated oven until a toothpick inserted into the cake comes out clean, 40 to 45 minutes. Let cool completely before frosting, at least 40 minutes.
  Beat cream cheese, butter, and vanilla extract together using an electric mixer until light and fluffy. Gradually beat in the confectioners' sugar to form a smooth frosting. Spread evenly over the cooled cake. Chill completely before slicing.
