It was identified that the original design of the Wastewater Treatment Plant (WWTP) to be implemented in the different projects of Block 57 only includes an aerobic biological process followed by a process of sedimentation and disinfection in two complementary consecutive stages, designed to comply the Water Quality Limits (LMP) according the Ministry of Environment regulations for effluent from domestic wastewater treatment plants, DS 003-2010-Minam. Since four years ago, oil and gas companies are regulated in terms of effluents by D.S. No. 037-2008-PCM: Maximum Permissible Limits of Liquid Effluent by Oil&Gas Industry, being more demanding on water quality parameters. For this reason, it is presented this study: Techniques for Optimization and Adaptation of Wastewater Treatment Plants (WWTP) adapting the plants to meet effluents regulations, also due to temporary increase of users, short term projects, presence of compounds of nitrogen and phosphorus in the water. The optimization includes controlling the aerobic biological process with operational changes by adjusting the concentration of dissolved oxygen to remove the ammoniacal nitrogen and purification of organic matter by biological means using the primary settling tank as anoxic process, the elimination of total phosphorus by testing dosage metal salts such as aluminum sulfate and ferric chloride to produce an ion exchange to remove the total phosphorus and operational improvements including a treatment system and sludge drying.