This excerpt is taken from Sheikh al-Islam Imam Ibn Taymiyyah's book Al-Jawab al-Bahir fi Zuwar al-Maqabir, translated by Sheikh Ataullah Saqib.
It was not possible to enter the blessed grave, nor is it now
Since the time you, peace be upon him, were buried in the honored grave, it has never been possible for anyone to enter the honored chamber to visit the grave or to send blessings, peace, or supplications upon you, peace be upon him. However, Umm al-Mu'minin Aisha Siddiqah, may Allah be pleased with her, resided there because it was her home, and that too on one side of the honored grave, because the graves of you, peace be upon him, and your two companions are near the door, and Umm al-Mu'minin Aisha, may Allah be pleased with her, lived in the very last part of the chamber. No companion would enter inside.
Until the time of the companions, the honored chamber remained outside the mosque. During the reign of Walid ibn Abd al-Malik ibn Marwan, when the Prophet's Mosque was expanded, the honored chamber was included inside the mosque. It should be noted that by that time, companions such as Ibn Umar, Ibn Abbas, Ibn Zubair, and Ibn Amr, may Allah be pleased with them, had passed away; in fact, it is more appropriate and correct to say that there was not a single companion alive in Medina Munawwarah, all had met their true Master. After all the companions, Jabir ibn Abdullah, may Allah be pleased with him, passed away in 70 AH, and the mosque expansion took place after 80 AH.
The Careful Procedure of the Companions Offering Salam to You
The Companions, may Allah be pleased with them, did not have the habit of going inside the blessed chamber near the honored grave or standing outside the chamber, even though they used to come and go day and night in the Prophet's Mosque. They were aware of the noble saying of the Messenger of Allah, peace and blessings be upon him:
صلاة فى مسجدي هذا خير من ألف صلاة فيما سواه من المساجد إلا المسجد الحرام
"The reward of a prayer in my mosque is better than a thousand prayers in other mosques, except for the Sacred Mosque (Masjid al-Haram)."
Reference: (Sahih al-Bukhari, Book of the Virtue of Prayer in Mecca and Medina, Hadith: 1190; Sahih Muslim, Book of Hajj: Chapter on the Virtue of Prayer in the Mosques of Mecca and Medina, Hadith: 1394)
The following noble saying of the Prophet, peace and blessings be upon him, was also before their eyes:
لا تشد الرحال إلا إلى ثلاثة مساجد المسجد الحرام ومسجدي هذا والمسجد الأقصى
"Do not set out on a journey for any mosque except for three mosques: the Sacred Mosque (Masjid al-Haram), my mosque, and Al-Aqsa Mosque."
Reference: (Sahih al-Bukhari, Hadith: 1189; Sahih Muslim, Book of Hajj: Chapter on the Virtue of the Three Mosques, Hadith: 1397)
The Companions, may Allah be pleased with them, used to travel long distances to Madinah Munawwarah to consult the Rightly Guided Caliphs on important matters. They would pray in the mosque, and upon entering and leaving the mosque, they would send blessings and peace upon the Prophet, peace and blessings be upon him. However, they did not feel the need to go near the honored grave because they knew that the Messenger of Allah, peace and blessings be upon him, neither permitted it nor made it a Sunnah. Yes! It is Sunnah to send salutations upon him during prayer, upon entering the mosque, and upon leaving it. However, it was the personal practice of Ibn Umar, may Allah be pleased with both of them, that whenever he returned to Madinah Munawwarah from a journey, he would come near the honored grave and send salutations upon the Prophet, peace and blessings be upon him, and his two companions.
Apart from Abdullah ibn Umar, it is occasionally proven from some other Companions as well. Therefore, some scholars hold the opinion that following in the footsteps of these Companions, it is permissible to go near the grave and send salutations. Along with this, it should always be kept in mind that Ibn Umar, may Allah be pleased with both of them, would immediately return after sending salutations and would not stay there for long. He would stand near the honored grave and say salutations like this:
السَّلَامُ عَلَيْكَ يَا رَسُولَ اللهِ السَّلَامُ عَلَيْكَ يَا أَبَا بَكْرٍ السَّلَامُ عَلَيْكَ يَا أَبَتِ
"O Messenger of Allah! Peace be upon you. O Abu Bakr! Peace be upon you. O Abu Jaan! Peace be upon you."
The Conduct of the Prominent Companions, the Pure Wives, and the People of Yemen
Like Ibn Umar, it was not the habit of the majority of the Companions, rather when they completed Hajj and reached Madinah Munawwarah, they would not even go to the honored grave to offer salutations at that time. Similarly, the Pure Wives of the Prophet, after completing Hajj and returning to Madinah Munawwarah, would go straight to their own homes, as was the will of the Messenger.
And listen! Those caravans from Yemen about whom Allah Almighty says:
فَسَوْفَ يَأْتِي اللهُ بِقَوْمٍ يُحِبُّهُمْ وَيُحِبُّونَهُ
"So soon Allah will bring forth people He will love and who will love Him."
Reference: (5-Al-Ma'idah:54)
During the caliphate of Abu Bakr Siddiq and Umar Farooq, when people came in armies for jihad to Madinah Munawwarah and prayed behind the Caliphs in the Prophet's Mosque, not a single person among them would enter the chamber to offer salutations nor feel the need to stand outside, because they knew the proper way of offering salutations as taught to them by the Companions and the Followers.
The rights of the Messenger of Allah ﷺ are connected with the rights of Allah. All those commands of Allah whose fulfillment is ordered and which He has liked, and the fulfillment of all the rights of the Messenger of Allah ﷺ are obligatory upon every Muslim, no matter in which part of the world he resides.