Sahih Bukhari | Volume 9 | Hadith Number 427

Narrated by Ibn 'Umar
The Prophet used to go to the Quba' mosque, sometimes walking, sometimes riding.