This article is an excerpt from our Sefer
Buy me here or on Amazon.com
Ledavid Hashem Ori:
One begins saying the psalm of Ledovid Hashem Ori from [the first day of] Rosh Chodesh Elul, by Shacharis after Shir Shel Yom and by Mincha before Aleinu. [On Rosh Chodesh the custom is to recite Ledavid only after Shir Shel Yom and Barchi Nafshi.]
Until when is it recited: The psalm of Ledavid is recited daily until Hoshana Rabbah, including Hoshana Raba. [It is not recited starting from Shemini Atzeres.]
If one is praying in a Shul that says Ledavid after Aleinu what is he to do?
He is to follow the congregation. Thus he is to say Aleinu with the congregation and then say with them Ledavid. However there are Poskim which rule one may follow his custom and say Ledavid before Aleinu.
When is the Kaddish Yasom to be said, before or after saying Ledavid?
The Chabad custom by Shacharis is to recite the Kaddish only after saying both Shir Shel Yom and Ledavid. This Kaddish counts for both Ledavid and Shir Shel Yom. [On Rosh Chodesh one says Shir Shel Yom, Barchi Nafshi, Ledavid and only then is the Kaddish recited.] Likewise by Mincha our custom is to recite Kaddish only after Ledavid and Aleinu and this Kaddish counts for both Aleinu and Ledavid.
Segulos involved in saying the above psalm:
One who recites the psalm of Ledavid from Rosh Chodesh Elul until Simchas Torah is able to tear any evil decree which has been placed upon him and is acquitted from judgment.
The recital of Ledavid is a Segula to banish all the evil forces and prosecuting angels. During the days of Elul that the thirteen attributes of mercy are revealed it is possible also for forces of evil to receive nurture and therefore we recite this Psalm to banish them from nurturing from holiness.
 Siddur Admur; Chemdas Yamim 1 p. 106 [That he would say by Selichos]; Moreh Baetzba 37; Shaareiy Rachamim [Chaim Kohen]; Sheim Tov Katan; Siddur Haari of Rav Shabsi; Shaar Hateshuvah 1/41 brought in Shaar Hakolel 11/28; Mateh Efraim 581/6; Kitzur Shulchan Aruch 128/2; M”B 581/2; See Divrei Yosef [Bnei Brak 1987] p. 163-185 for a full overview on this subject.
This custom is not found in Poskim or in the classical Sifrei Kabala. [Shaar Hakolel 11/28] Some say the source for saying this psalm is from the Midrash Seichel Tov which states that “Uri” is Rosh Hashanah, and “Yisheiy” is Yom Kippur, “Yitzpineini Besuko” refers to Sukkos. [Mateh Efraim in Alef Lamateh 581/6; Kitzur ibid] Others however negate this explanation as there are many verses that refer to Rosh Hashanah and Yom Kippur and nevertheless we are not accustomed to read it during Elul. [Shaar Hakolel 11/28] The first to mention this custom is the Siddur of Rav Shabsi Rashkovir and from there it was printed in all the Siddurim to recite in the month of Elul. Seemingly he was the innovator of this custom due to the great Segulos he writes about it, or perhaps he received it as a personal tradition from his Rabbis. [Shaar Hakolel ibid] This custom is mentioned in the Chida [Moreh Baetzba 1/37] and is brought in the following Sefarim written by students of the Arizal: Shaareiy Rachamim [Chaim Kohen]; Sheim Tov Katan. It is also brought in the Sefer Chemdas Yamim 1 p. 106 which is of questionable legitimacy. Based on this it seems that this custom was first introduced only starting 300 years ago. [Divrei Yosef ibid]
Other customs: Some have the custom not to recite this psalm during Davening in Elul. [Maaseh Rav 53 brings the Gra would not recite it; Siddur Leiv Sameich brings that Hayehudi Hakadosh and the Chozeh Melublin did not recite it. Reb Chaim of Tzanz did not recite it. See Divreiy Moshe 134; Piskeiy Teshuvos 581/11 footnote 73-76] Some say the reason for this omission is because the saying of this psalm in Elul was not brought within the writings of the Arizal or in the Shulchan Aruch. It is rather sourced in the Sefer Chemdas Yamim which is debated whether the author was a follower of Shabtai Tzvi. [Some say its author was Nathan of Gaza.] Now although its source has been found in other places, nevertheless the source for it to be said within prayer is from the Chemdas Yamim. [Divreiy Moshe 134; Piskeiy Teshuvos 581/11 footnote 73-76] This however is incorrect as the Chemdas Yamim does not even state to recite it during Davening but that he had a personal custom to say it during Selichos, hence certainly the source for our custom is not in the Chemdas Yamim. [Divrei Yosef ibid]
 Psalm 27
Its meaning: The psalm contains 13 names of Hashem in correspondence to the 13 attributes of mercy which are revealed in the month of Elul. [Siddur Reb Shabsi ibid, brought in Shaar Hakolel ibid; Panim Yafos Vayikra 16/21]
 Sefer Haminhagim 112; Hayom Yom p. 83
Other opinions: Some Poskim rule that we begin saying it from second day of Rosh Chodesh. [Kitzur Shulchan Aruch ibid]
 M”B 581/2; See Shaar Hakolel 11/28
 Siddur Admur; M”B 581/2; Siddur Beis Yaavetz-additions of the editor; See Divrei Malkiel 6/23-2 for an explanation on this matter; See Glosses of Rav Raskin footnote 472 that explains perhaps the custom used to be to say it after Maariv during times that Maariv was Davened during the day, however today that we Daven Maariv always at night, since we cannot read Tehillim at night it is said after Mincha.
Other Opinions: Some are accustomed to say Ledavid after Maariv [Alef Hamagen 581/6; Divrei Malkiel 6/23-2 [Minhag Ashkenaz]; See Kitzur Shulchan Aruch 128/2 which says “morning and evening” However see M”B 581/2 that states “evening” here refers to Mincha.]
 Mateh Efraim 581/6; M”B 581/2; Siddur Beis Yaavetz-additions of the editor; Glosses of Rav Raskin on Siddur footnote 469 based on Luach Kolel Chabad.
The reason: As Rosh Chodesh is more common and hence its Psalm of Barchi Nafshi is to be recited first. [M”E ibid]
 Siddur Admur; Chida in Moreh Baetzba ibid; See Shaar Hakolel 11/28; 45/6 that the Segula of Ledavid applies only until Hoshana Raba as on Hoshana Raba the judgment is complete and we no longer need to ask Hashem to prevent the Kelipos from nurturing from holiness.
Other Opinions: Some Poskim rule that it is said until Shemini Atzeres, including Shemini Atzeres. [Siddur Reb Shabsi; M”B 581/2; Sheim Tov Katan; Siddur Beis Yaavetz-additions of the editor] Some rule it is said only until Yom Kippur. [brought in M”B ibid;See Shaar Hakolel 11/28]
 Igros Kodesh 19/430
 Vetzaruch Iyun as what is the reason for this. Perhaps it is done in order to say Aleinu with congregation. [See Elya Raba 237/4; Machatzis Hashekel 65/6; Ketzos Hashulchan 13/6] Vetzaruch Iyun if based on this one can deduce that whenever one is Davening in a Minyan and they reach Aleinu before him, one is to stop and say Aleinu with them, even if he is in the midst of Davening [in an area that he may stop].
 Divreiy Moshe 1/35
 Shaar Hakolel 11/29 in name of Reb Hillel Paritcher; Sefer Haminhagim p. 112 [English]; Toras Menachem 25/230 [brought in Shulchan Menachem 3/73]
The reason: As it is our custom to diminish in the amount of Kaddeishim we recite, and to only recite the Kaddeishim that were instituted by the previous Sages. [ibid; See Beir Heiytiv 55/1]
Other Opinions: Some have the custom to recite two Kaddeishim of Kaddish Yasom; one after Shir Shel Yom and one after Ledavid. Likewise by Mincha they recite one after Ledavid and another after Aleinu. [See Siddur Beis Yaavetz-additions of the editor]
 See Divrei Yosef p. 166-169
 Sheim Tov Katan brought in Piskeiy Teshuvos 581/11
 Siddur of Reb Shabsi brought in Shaar Hakolel 11/28
 See Shaar Hakolel 11/28