We study the effect of buckling and breathing phonons, relevant for cuprate superconductors, on the d-wave superconductivity in the two-dimensional Hubbard model by employing dynamical cluster Monte Carlo calculations. The interplay of electronic correlations and the electron–phonon interaction produces two competing effects: an enhancement of the effective d-wave pairing interaction, which favors d-wave superconductivity, and a strong renormalization of the single-particle propagator, which suppresses superconductivity. In the region of the parameter space relevant for cuprate superconductors, we find that the buckling and the breathing phonons suppress the superconductivity.