With the discovery of charge-density waves (CDWs) in most members of the cuprate high-temperature superconductors, the interplay between superconductivity and CDWs has become a key point in the debate on the origin of high-temperature superconductivity. Some experiments in cuprates point toward a CDW state competing with superconductivity, but others raise the possibility of a CDW-superconductivity intertwined order or more elusive pair-density waves (PDWs). Here, we have used proton irradiation to induce disorder in crystals of La1.875Ba0.125CuO4 and observed a striking 50% increase of Tc, accompanied by a suppression of the CDWs. This is in sharp contrast with the behavior expected of a d-wave superconductor, for which both magnetic and nonmagnetic defects should suppress Tc. Our results thus make an unambiguous case for the strong detrimental effect of the CDW on bulk superconductivity in La1.875Ba0.125CuO4. Using tunnel diode oscillator (TDO) measurements, we find indications for potential dynamic layer decoupling in a PDW phase. Our results establish irradiation-induced disorder as a particularly relevant tuning parameter for the many families of superconductors with coexisting density waves, which we demonstrate on superconductors such as the dichalcogenides and Lu5Ir4Si10.