If I use whole wheat flour instead of regular flour in a cake recepie, which changes I need to do to get it right?

Can you tell us more about the recipe? Pound cake? Layer cake? Sponge? Is this a butter or oil based cake? What leavening agent is currently used and in what proportion? Is there milk or buttermilk in this cake?

In general, you won't be able to substitute the full amount of AP flour for whole wheat. I'd start with 1/4 whole wheat, 3/4 AP flour and see how it behaves. Better yet, I would spring for whole wheat pastry flour if you really want to use whole wheat 100%. The grain of it will be finer, it will weigh less and perform better in a cake recipe. Whole wheat will be less noticeable in a chocolate cake or in a spice cake than in a plain vanilla cake.

If you do a 100% swap-out for the white flour, you're going to get a very dense cake that will not rise much, if at all. General rule is to substitute no more than 50% if you want the texture to remain soft and light. Even then, the cake will not rise as much. I would look for a whole grain cake recipe as suggested by Hilarybee. No need to reinvent the wheel.

Hillarybee's suggestion to pick up some whole wheat pastry flour is excellent. At that, though, she is correct that you still shouldn't go all in for 100% of it in your recipe. 25% would be a good start, and for the balance I'd suggest cake flour rather than AP flour. WW pastry flour has a protein content of about 9%, whereas that of cake flour is closer to 7%. 1:3 ratio will still give you a tender cake with a good rise.