This work presents the enhancement of the electrocoagulation (EC) as a post-treatment to photochemical oxidation (UV/Fe2+/H2O2) by selecting of the current density (j; A m-2) and electrolysis time (t; min) for minimal specific electrical energy consumption (SEC; kWh per kg COD removed) and lower average lethal concentration (LC50; %) of dairy wastewater. According to Harrington desirability function and based on experimental data, some scenarios were systematically evaluated to determine the EC conditions that could result in the most desirable overall profile to improve EC effectiveness. The performance was evaluated by the removal of the COD, TOC and Fe2+ remaining of the UV/Fe2+/H2O2. The EC effectiveness was characterized by the ideal current efficiency (ϕ; 1.15 ± 0.05), and the electrode mass consumed (g Al; 0.674 ± 0.030), by considering the minimal SEC (19.20 kWh per kg COD removed) and lowest operating cost (US $ 8.89 per kg COD removed), as well. This occurred in 85.71 A m-2, 35 min and initial pH 2.95, that ensured the degradation/mineralization of the organic matter (≈ 90 % of removal) and the required circumneutral final pH (6.85 ± 0.06) for safely directable final disposal. Besides, COD/TOC ratio went from 3.47 to 2.69, suggesting an increasing biodegradability of this wastewater, and a reducing of the toxicity that was verified by the lower acute toxicity (LC50 ≈ 88 %).