A method for the electrochemical treatment of wastewater comprising the steps of: a. supplying a wastewater stream to be treated to a reactor tank, b. treating the wastewater from the reactor tank in a first electrolyzer comprising a stack of electrolytic cells, each electrolytic cell comprising an anode of a first composition and discarding an effluent stream from the first electrolyzer into the reactor tank, c. monitoring the contaminant concentration in the wastewater from the reactor tank, by measuring the chemical oxygen demand concentration in the wastewater or by measuring the total organic carbon concentration in the wastewater, d. repeating the step of treating the wastewater in the first electrolyzer and discarding the effluent stream from the first electrolyzer into the reactor tank until the contaminant concentration in the wastewater to be treated becomes substantially constant; e. when the concentration in the wastewater to be treated becomes substantially constant, stopping the treatment of wastewater in the first electrolyzer and treating the wastewater from the reactor tank in a second electrolyzer comprising a stack of electrolytic cells, each electrolytic cell comprising an anode of a second composition, which is different than the first composition of the anodes in the first electrolyzer, f. treating the wastewater in the second electrolyzer and discarding an effluent stream from the second electrolyzer back to the reactor tank, g. monitoring the contaminant concentration in the wastewater from the reactor tank, h. discarding the effluent stream from the second electrolyzer back to the reactor tank until the contaminant concentration in the wastewater from the reactor tank reaches a predetermined target value, and i. discarding the wastewater from the reactor tank at a predetermined location. a. supplying a wastewater stream to be treated to a reactor tank, b. treating the wastewater from the reactor tank in a first electrolyzer comprising a stack of electrolytic cells, each electrolytic cell comprising an anode of a first composition and discarding an effluent stream from the first electrolyzer into the reactor tank, c. monitoring the contaminant concentration in the wastewater from the reactor tank, by measuring the chemical oxygen demand concentration in the wastewater or by measuring the total organic carbon concentration in the wastewater, d. repeating the step of treating the wastewater in the first electrolyzer and discarding the effluent stream from the first electrolyzer into the reactor tank until the contaminant concentration in the wastewater to be treated becomes substantially constant; e. when the concentration in the wastewater to be treated becomes substantially constant, stopping the treatment of wastewater in the first electrolyzer and treating the wastewater from the reactor tank in a second electrolyzer comprising a stack of electrolytic cells, each electrolytic cell comprising an anode of a second composition, which is different than the first composition of the anodes in the first electrolyzer, f. treating the wastewater in the second electrolyzer and discarding an effluent stream from the second electrolyzer back to the reactor tank, g. monitoring the contaminant concentration in the wastewater from the reactor tank, h. discarding the effluent stream from the second electrolyzer back to the reactor tank until the contaminant concentration in the wastewater from the reactor tank reaches a predetermined target value, and i. discarding the wastewater from the reactor tank at a predetermined location.