Due to the seriousness of the water shortage crisis over the past decades, the need to manage water use has become more and more important. Pressure management in urban water distribution networks is one of the options that can significantly reduce water loss. The pressure reducing valve (PRV) and the variable speed pump (VSP) are two devices that are most used in water distribution system (WDS) pressure management. In the present study, an optimization code was first proposed to estimate the instantaneous water demand based on the reported network pressures. According to the estimated instantaneous water demand, another optimization code is presented based on the DE algorithm to control the installed PRVs and VSPs. This results in the uniform distribution of the pressure and reduction of the excessive pressure on the water network for all hours of the day, reducing the water leakage and energy consumption accordingly. The provided method has been applied to a real water distribution network in northern Iran. The results showed that by applying this method, the network background leakage and the energy consumption have been reduced by 41.72% and 28.4%, respectively, compared to a non-management mode.