Electrical layouts have a significant impact on the investment cost and electrical losses of wind farms, and therefore, layouts should be optimized for reducing their share in the project budgets. In this study, a two-stage method for electrical layout optimization is given. In the first stage, the total trenching length between wind turbines and substation is minimized and in the second stage, the cabling process is performed. The contribution of this article with respect to earlier studies is twofold: First, a new theory for cabling is given and it has shown that determination of the best type of electrical cable is a priori. The suggested cabling theory reduces the complexity of the electrical layout problem since the cable related variables and constraints are avoided. Second, a new bi-objective problem is defined which allows parallel cabling over the previously defined paths. The cabling problem defined aims to minimize the net present cost of the electrical losses and initial investment costs over a known path. Moreover, a novel 3D methodology is introduced for calculating the total length of cables and trenching over the surface of the ground more accurately. All theoretical work is applied on a real onshore wind farm.