1. Preheat the Oven:
- Preheat your oven to 350°F (175°C). Grease and flour a 9×13-inch baking pan or line it with parchment paper.
2. Mix the Dry Ingredients:
- In a large mixing bowl, whisk together the flour, sugar, cocoa powder, baking soda, and salt.
3. Add the Wet Ingredients:
- In a separate bowl, combine the Dr. Pepper, melted butter, eggs, buttermilk, and vanilla extract. Beat until smooth.
4. Combine and Mix:
- Gradually add the wet ingredients to the dry ingredients, stirring until just combined. Do not overmix.
5. Bake the Cake:
- Pour the batter into the prepared pan and smooth the top. Bake for 30-35 minutes, or until a toothpick inserted into the center comes out clean.
- Let the cake cool in the pan for 10 minutes, then transfer to a wire rack to cool completely.
6. Prepare the Frosting (Optional):
- In a small saucepan, combine the Dr. Pepper, butter, and cocoa powder. Heat over medium heat, stirring, until the butter melts and the mixture is smooth.
- Remove from heat and whisk in the powdered sugar and vanilla extract until smooth.
7. Frost the Cake:
- Pour the frosting over the cooled cake and spread it evenly. Let it set for 10-15 minutes before serving.