In some cases, it may be possible to switch between oil and butter in recipes, but it is not something I recommend. Butter adds a surprising amount of flavor to cakes and cupcakes, particularly vanilla or plain ones. Most of my recipes are made by the creaming method - beating butter and sugar together - which helps to incorporate air into the batter to make it fluffy; if you use oil, the cake will be flatter and denser.