The Messenger of Allah ﷺ said, "Whoever sets out and comes to this mosque, meaning the mosque of Quba, and prays in it, it is equal to performing an Umrah."
حدثنا إسحاق بن عيسى حدثني مجمع بن يعقوب الأنصاري بقباء قال حدثني محمد بن الكرماني قال سمعت
رسول الله ﷺ من خرج حتى يأتي هذا المسجد يعني مسجد قباء فيصلي فيه كان كعدل عمرة
Its isnad is sahih. Mujammi bin Yaqub bin Mujammi bin Jariyah, they deemed him trustworthy and accepted his hadith. Likewise Muhammad bin Sulayman al-Madani al-Qubai, who settled in Kerman, and Imam Ahmad attributed him to Kerman.The hadith was narrated by Nasai, 2/37, no. 199, in the Book of Masjids, chapter on the merit of masjid Quba, and Ibn Majah, 1/453, no. 1412, in the Book of Establishing Prayer, chapter on what has been said about praying in masjid Quba.