The Messenger of Allah ﷺ used to encourage standing in prayer during Ramadan without making it a strict obligation. He would say, "Whoever stands in prayer during Ramadan out of faith and seeking reward will have his past sins forgiven."Ibn Shihab said, The Messenger of Allah ﷺ passed away while the matter remained as such, and it continued in the same manner during the caliphate of Abu Bakr and the early part of the caliphate of Umar.
أن رسول الله ﷺ كان يرغب في قيام رمضان من غير أن يأمر بعزيمة، فيقول: من قام رمضان إيمانا واحتسابا غفر له ما تقدم من ذنبه. قال ابن شهاب: فتوفي رسول الله ﷺ، والأمر على ذلك ثم كان الأمر على ذلك في خلافة أبي بكر، وصدرا من خلافة عمر.
Malik narrated it in the Book of Prayer in Ramadan (2), from Ibn Shihab, from Abu Salama bin Abdul-Rahman bin Awf, from Abu Hurairah, and he related it. Muslim also narrated it in the Prayer of Travelers (759:174) through the hadith of Abdul-Razzaq, and it is in his Musannaf (7719), and from him Ahmad (7787) and the compilers of the Sunan, except for Ibn Majah, narrated it. He said, Mamar told us, from Zuhri, from Abu Salama, from Abu Hurairah, and he related it.His statement, "The Messenger of Allah ﷺ then passed away, and the matter remained as such," is from the words of Zuhri, as it appears in Muwatta. Bukhari likewise said this in the chapter on the prayer of tarawih (2009), but Muslim did not separate it out, rather in his version it occurs within the same report itself. The correct view is that it is separate from the hadith. Its meaning is that congregational prayer was abandoned for tarawih.Ibn Abdul-Barr said, "In this hadith there is a point of jurisprudence, namely the merit of standing in prayer during Ramadan, and its apparent meaning permits both congregational and individual performance of it, since all of that is an act of good."