Charity on behalf of the Deceased and Praying for him Riyad as-Salihin 949

Arabic hadith text
وعن أبي هريرة رضي الله عنه أن رسول الله صلى الله عليه وسلم قال‏:‏ “إذا مات الأنسان انقطع عمله إلا من ثلاث‏:‏ صدقة جارية، أو علم ينتفع به، أو ولد صالح يدعو له‏"‏ ‏(‏‏(‏رواه مسلم‏)‏‏)‏‏.‏
Translation
Abu Hurairah (May Allah be pleased with him) reported

The Messenger of Allah (ﷺ) said, "When a man dies, his deeds come to an end, except for three: A continuous charity, knowledge by which people derive benefit, pious son who prays for him."[Muslim].