Shaykh Muhammad bin Saalih Al-‘Uthaimeen (died in 1421) rahimahul-llah was asked about the meaning of the hadith “Verily, faith will return to Madeenah the same way the snake returns to its hole” Bukhaaree no 1876 and Muslim no 147?
“It means it will return and consolidate itself in Madeenah. And this is an indication from the prophet peace is upon him that faith will return to Madeenah when other places become corrupted the same way that the snake comes out and wonders on the land then returns to its hole. There is also an indication that Islam will return to Madeenah the same way it started from Madeenah, for that the might and authority of Islam were spread from Madeenah even though its origin was in Makkah which was the first host of revelation. However the Muslims did not establish a state and an authority except when they emigrated to Madeenah, therefore the might and authority of Islam were initiated from Madeenah and it will return to it at the end of time.
And some people of knowledge said: this is an indication to something that has already occurred and it means that people will travel from many places to receive Islam and study the religion from the prophet peace is upon him in Madeenah.
However, the first interpretation is the apparent of the text and it is the plausible one”
Fatwas of Ibnul-‘Uthaimeen rahimahul-llah 1/55