Hamiltonian PDEs are known to admit rich families of periodic traveling waves, the prototype of which are the cnoidal waves in the Korteweg-de Vries equation. The purpose of the talk is to address the stability of those waves without relying on any integrability argument. This will be done first in an abstract framework, and then applied to three basic examples that are very closely related and include many models of mathematical physics - ranging from nonlinear optics to water waves -, namely, the generalized Korteweg-de Vries equation, and the Euler--Korteweg system in both Eulerian coordinates and in mass Lagrangian coordinates. It will be shown in particular that a single tool - the abbreviated action functional along the orbits - encodes several types of stability, namely, spectral, modulational, and co-periodic orbital stability. This is based on joint work with C. Mietka, P. Noble and M. Rodrigues.