We study the application of Taylor's frozen hypothesis to the pressure fluctuations in turbulent channels by means of spatio-temporal data from direct numerical simulations with large computational domains up to the friction Reynolds number $R{e_\tau } = 2000$. The applicability of the hypothesis is quantitatively verified by comparing the wavenumber and Taylor (frequency) premultiplied spectra of the pressure fluctuations at each distance y from the wall. Using the local mean velocity $U(y)$ for the hypothesis leads to a large difference between both spectra with a value of $O(50\,{\%})$ for its maximum from the wall to $y/h \approx 0.2$, where h is the channel half-depth. Alternatively, the convection velocity of the pressure fluctuations ${C_p}(y)$, originally defined by Del Álamo & Jiménez (J. Fluid Mech., vol. 640, 2009, pp. 5–26) as a function of y, is investigated and adopted for the hypothesis. It is nearly equal to $U(y)$ from ${y^ + } = 20$ to the channel centre, where ${y^ + } = y{u_\tau }/\nu $, in which ${u_\tau }$ and $\nu $ represent the friction velocity and kinematic viscosity, respectively. For ${y^ + } \le 20$, ${C_p}(y)$ is almost constant with a value of around $12{u_\tau }$. Applying ${C_p}(y)$ for the hypothesis decreases the difference between both spectra down to a value of $O(10\,{\%})$ for its maximum from the wall to $y/h \approx 0.2$. Finally, the difference between the pressure wavenumber and frequency premultiplied spectra near the wall is reduced further via applying a wavenumber-dependent convection velocity. This wavenumber-dependent convection velocity is the linear combination of the convection velocities of the turbulent structures associated with the pressure field weighted by their relative contributions to the pressure variance.