Preheat oven to 350ºF. Line two 6-inch round cake pans with parchment paper. Lightly grease and set aside.
Whisk together flour, cocoa powder, baking powder, baking soda, and salt. Set aside.
In the bowl of a stand mixer fitted with a paddle attachment, mix together coconut oil, sugar, espresso powder, eggs, and vanilla until well combined. On low speed alternate adding dry flour mixture and milk. Add about 1/3 of flour, following with 1/2 of milk. Add another 1/3 of flour and remaining milk. Scrape down bowl as needed to ensure thorough mixing. Add sour cream and remaining flour. Mix on low speed until there are no longer any streaks of dry flour.
Divide batter between prepared cake pans. Level batter. Bake for 28-30 minutes until toothpick inserted in center of cake comes out clean. Allow cake to cool in pan for 5 minutes before unmolding. Allow cakes to cool to room temperature on wire rack.