Sahih al-Bukhari, Book 96, Hadith 56 (Bukhari 7048)

Narrated Ibn `Umar:

The Prophet (ﷺ) used to go to the Quba' mosque, sometimes walking, sometimes riding.