Cuprate superconductors have a universal tendency to form charge density-wave (CDW) order which competes with superconductivity and is strongest at a doping $p simeq 0.12$. Here we show that in the archetypal cuprate YBa$_{2}$Cu$_{3}$O$_{y}$ (YBCO) pressure suppresses charge order, but does not affect the pseudogap phase. This is based on transport measurements under pressure, which reveal that the onset of the pseudogap at $T^*$ is independent of pressure, while the negative Hall effect, a clear signature of CDW order in YBCO, is suppressed by pressure. We also find that pressure and magnetic field shift the superconducting transition temperature $T_{rm c}$ of YBCO in the same way as a function of doping - but in opposite directions - and most effectively at $p simeq 0.12$. This shows that the competition between superconductivity and CDW order can be tuned in two ways, either by suppressing superconductivity with field or suppressing CDW order by pressure. Based on existing high-pressure data and our own work, we observe that when CDW order is fully suppressed at high pressure, the so-called 1/8 anomaly in the superconducting dome vanishes, revealing a smooth $T_{rm c}$ dome which now peaks at $p simeq 0.13$. We propose that this $T_{rm c}$ dome is shaped by the competing effects of the pseudogap phase below its critical point $p^{star} sim 0.19$ and spin order at low doping.