The existence of a significant population of Ap stars with very long rotation periods (up to several hundred years) has progressively emerged over the past two decades. However, only lower limits of the periods are known for most of them because their variations have not yet been observed over a sufficient timebase. We determine the rotation period of the slowly rotating Ap star HD 18078 and we derive constraints on the geometrical structure of its magnetic field. We combine measurements of the mean magnetic field modulus obtained from 1990 to 1997 with determinations of the mean longitudinal magnetic field spanning the 1999-2007 time interval to derive an unambiguous value of the rotation period. We show that this value is consistent with photometric variations recorded in the Stromgren uvby photometric system between 1995 and 2004. We fit the variations of the two above-mentioned field moments with a simple model to constrain the magnetic structure.