Abu Tufayl reported,

I said to Ibn Abbas, "Tell me about performing the circuit between Safa and Marwa while riding. Is it a sunnah? Your people claim it is a sunnah."He replied, "They are right and they are wrong."I asked, "What do you mean, 'They are right and they are wrong'?"He explained, "The Messenger of Allah ﷺ was crowded by people who kept saying, 'This is Muhammad, this is Muhammad,' until even the young women came out of their houses. The Messenger of Allah ﷺ would not have people struck aside before him, so when the crowd became too dense, he rode. But walking and going briskly is better."

Azami 5046

Sahih

عن أبي الطفيل، قال

قلت لابن عباس: أخبرني عن الطواف بين الصفا والمروة راكبا، أسنة هو؟ فإن قومك يزعمون أنه سنة؟ قال: صدقوا وكذبوا قال: قلت: وما قولك صدقوا وكذبوا؟ قال: إن رسول الله ﷺ كثر عليه الناس يقولون: هذا محمد، هذا محمد، حتى خرج العواتق من البيوت، قال: وكان رسول الله ﷺ لا يضرب الناس بين يديه، فلما كثر عليه ركب، والمشي والسعي أفضل.

الأعظمي 5046صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Hajj
Chapter
Description of the Hajj of the Prophet ﷺ as narrated by Jabir and others, and the rulings mentioned therein
Section
Permissibility of walking between Safa and Marwa while riding or walking
Numbering
Jami al-Kamil 5046 (2nd edition)
Azami 5046