We have performed an exact diagonalization of a many body Hamiltonian that includes electron correlations and electron–phonon interactions. Electronic and phononic parameters entering in the Hamiltonian were chosen for the cluster O(4)—Cu–O(4) cluster in YBa2Cu3O7. Electronic and phononic degrees of freedom are coupled through the bare electron hopping, as in the Su–Schieffer–Heeger (SSH) Hamiltonian [W. P. Su et al., Phys. Rev. Lett. 42, 1698 (1979); A. J. Heeger, Rev. Mod. Phys. 60, 781 (1988)]. Fixing all parameters entering in the model Hamiltonian, the electron–phonon coupling was varied in order to reproduce structural short-range distortions found in the z-axis direction for YBa2Cu3O7. Although the inferred structural distortions are reproduced, we find that this type of coupling, unlike the electron–phonon coupling introduced in Peierls–Hubbard models, does not lead to excitations with polaronic energies and negative isotopic shifts typical of polaronic excitations.