Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) says that the Messenger of Allah (peace and blessings be upon him) said on the day of the conquest of Makkah: "(After today) there is no emigration, but jihad and intention remain; and when you are called out (for jihad), then go forth."
The meaning of his (peace and blessings be upon him) statement 'la hijrah' (there is no emigration) is (and Allah knows best) that emigration is not obligatory upon anyone of the people of Makkah who accepted Islam after the conquest of Makkah, because it has become the abode of Islam and the abode of safety, and no one in this city fears being put to trial regarding his religion; and likewise other places besides Makkah when, after being conquered, they become havens of peace and security (emigration from there is not obligatory either).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17767