Start by preheating your oven to 350°F (175°C) and lining the bottoms of two 8-inch round cake pans with parchment paper, this will help your cakes come out without a hitch.
In a medium bowl, mix together the flour, cocoa powder, espresso powder, baking powder, baking soda, and salt. Give it a good whisk and set it aside for now.
In a bigger bowl, whisk together the melted butter, oil, granulated sugar, and brown sugar until it's all smooth and blended together.
Add your eggs one at a time, making sure to whisk each one in fully before adding the next. This will help your batter come together nicely.
Now, let’s bring the dry and wet ingredients together. Start by adding half of the dry mix to the wet ingredients and gently whisk it together.
Then, add half of the milk and mix until it’s smooth. Repeat with the remaining dry ingredients and milk.
The batter should be thick but still pourable, and a little lumpy is perfectly fine!
Divide the batter evenly between the two cake pans, filling them about ¾ of the way full.
Pop them in the oven and bake for 35-40 minutes. You’ll know they’re done when a toothpick comes out with a few moist crumbs.
Once out of the oven, let your cakes cool in the pans for about 15 minutes. After that, gently loosen the edges with a knife and flip them out onto a wire rack to cool completely.
Beat the softened butter in a large bowl with an electric mixer until it's light and fluffy, about 3-5 minutes.
Gradually add the powdered sugar and keep mixing until everything is nice and airy. Then, add the peanut butter and vanilla extract, and mix until it’s smooth and creamy.
If the frosting feels too thick, just add a bit of heavy cream to get it to your perfect consistency.
When the cakes are fully cooled, place the first cake layer on a cake stand or plate.
Spread a nice, thick layer of that delicious peanut butter frosting on top. Add the second layer and then spread the remaining frosting all over the top.
Finish it off with a sprinkle of chocolate shavings, and you’re all set!