Joshua1:8

לֹא־יָמוּשׁ סֵפֶר הַתּוֹרָה הַזֶּה מִפִּיךָ וְהָגִיתָ בּוֹ יוֹמָם וָלַיְלָה לְמַעַן תִּשְׁמֹר לַעֲשׂוֹת כְּכָל־הַכָּתוּב בּוֹ כִּי־אָז תַּצְלִיחַ אֶת־דְּרָכֶךָ וְאָז תַּשְׂכִּיל׃

This book of the Torah shall not depart from your mouth, and you shall meditate on it day and night, so that you may keep and do all that is written in it, for then you will make your way prosper, and then you will act wisely.

Joshua 1:8

לֹא־יָמוּשׁ סֵפֶר הַתּוֹרָה

Yehoshua / Joshua 1:8

לֹא־יָמוּשׁ סֵפֶר הַתּוֹרָה הַזֶּה מִפִּיךָ וְהָגִיתָ בּוֹ יוֹמָם וָלַיְלָה לְמַעַן תִּשְׁמֹר לַעֲשׂוֹת כְּכָל־הַכָּתוּב בּוֹ כִּי־אָז תַּצְלִיחַ אֶת־דְּרָכֶךָ וְאָז תַּשְׂכִּיל׃

This book of the Torah shall not depart from your mouth, and you shall meditate on it day and night, so that you may keep and do all that is written in it, for then you will make your way prosper, and then you will act wisely.

Pshat פְּשָׁט

A commandment or a blessing

Rashi: the book of Mishneh Torah lay before Yehoshua, and "meditate" means to look into it with the heart. The Radak: the sages argued whether this is a commandment or a blessing. In his view, it is a commandment to Yehoshua and to every person until he knows the Torah, and afterwards let him study the sciences. Metzudat David: let the Torah not depart from your mouth, or something will be forgotten.

How Rashi, Radak, and Metzudat David explain it

Remez רֶמֶז

Reading as if doing it all

The Chida: a person is obliged to fulfill all six hundred and thirteen commandments, and many of them he cannot fulfill. The verse hints: whoever reads the Torah constantly is credited as if he keeps and does all that is written in it. The Radak: in the word "your way" (דְּרָכֶךָ) the plural letter yod (י) is not written.

How Chomat Anakh (Chida) and Radak explain it

Drash דְּרָשׁ

Success here, wisdom there

Midrash Tehillim: the righteous one is like a tree transplanted so firmly that no winds in the world will move it from its place. If the Torah does not depart from your mouth, "then you will make your way prosper" in this world, "and then you will act wisely" in the world to come. So Shlomo (Solomon) said: on the way it leads you, in the grave it guards you, and on waking it speaks for you.

How Midrash Tehillim explain it

Sod סוֹד

Day and night in two readings

Tikkunei Zohar: can a person engage in Torah all days and nights? The Holy One, blessed is He, does not come to His creatures with impossible demands. Whoever reads the Shema each day, evening and morning, is as if he fulfills "and you shall meditate on it day and night".

How Tikkunei Zohar explain it