Green energy has become a media issue due to climate changes, and consequently, the population has become more aware of pollution. Wind farms are an essential energy production alternative to fossil energy. The incentive to produce wind energy was a government policy some decades ago to decrease carbon emissions. In recent decades, wind farms were formed by a substation and a couple of turbines. Nowadays, wind farms are designed with hundreds of turbines requiring more than one substation. This paper formulates an integer linear programming model to design wind farms’ cable layout with several turbines. The proposed model obtains the optimal solution considering different cable types, infrastructure costs, and energy losses. An additional constraint was considered to limit the number of cables that cross a walkway, i.e., the number of connections between a set of wind turbines and the remaining wind farm. Furthermore, considering a discrete set of possible turbine locations, the model allows identifying those that should be present in the optimal solution, thereby addressing the optimal location of the substation(s) in the wind farm. The paper illustrates solutions and the associated costs of two wind farms, with up to 102 turbines and three substations in the optimal solution, selected among sixteen possible places. The optimal solutions are obtained in a short time.