If the baking soda or baking powder is old or not measured correctly, there is a possibility of not rising the cake properly so make sure to use fresh leavening agents and measure them properly. Also, do not overmix the batter.