Preheat oven to 350°F (175°C). Grease and flour two 9-inch round cake pans.
In a large bowl, whisk together flour, sugar, cocoa powder, baking powder, baking soda, and salt.
Add eggs, milk, oil, warm water (or coffee), and vanilla. Mix until smooth.
Divide batter evenly between the prepared pans.
Bake for 30-35 minutes, or until a toothpick inserted comes out clean.
Let cakes cool in pans for 10 minutes, then transfer to a wire rack to cool completely.
For the ganache, heat heavy cream until just simmering, then pour over chopped chocolate. Stir until smooth. Add butter if using.
Let ganache cool slightly, then spread over the cooled cake layers.