A search for a neutrino signal from WIMP pair annihilations in the centre of the Earth has been performed with the data collected with the ANTARES neutrino telescope from 2007 to 2012. The event selection criteria have been developed and tuned to maximise the sensitivity of the experiment to such a neutrino signal. No significant excess of neutrinos over the expected background has been observed. Upper limits at $90%$ C.L. on the WIMP annihilation rate in the Earth and the spin independent scattering cross-section of WIMPs to nucleons $sigma^{SI}_p$ were calculated for WIMP pair annihilations into either $tau^{+}tau^{-}$, $W^+W^-$, $boverline{b}$ or the non-SUSY $ u_{mu}bar{ u}_{mu}$ as a function of the WIMP mass (between $25,mathrm{GeV/c^2}$ and $1000,mathrm{GeV/c^2}$) and as a function of the thermally averaged annihilation cross section times velocity $langlesigma_{A} vrangle_{Earth}$ of the WIMPs in the centre of the Earth. For masses of the WIMP close to the mass of iron nuclei ($50,mathrm{GeV/c^2}$), the obtained limits on $sigma^{SI}_p$ are more stringent than those obtained by other indirect searches.