"And there arose a new king" (Exodus 1:8). But was Pharaoh a new king? Rather, this teaches that he renewed against them harsh decrees. Another interpretation of "And there arose a new king," etc.: He was the same first Pharaoh. Rather, they said to him, "Let us conspire against them." He said to them, "Fools! Until now they have been ruling over us, and we have not been ruling over them; and were it not for Joseph, those men would not be alive. And we wish to conspire against them?" Immediately they brought him down from his throne, and he remained so for three months. After that he said to them, "Whatever you say, I will listen to you." They restored him to his throne. Therefore it says "And there arose a new king." This is what is written: "They have dealt treacherously against the Lord, for they have begotten strange children" (Hosea 5:7) — that the children of Israel broke the covenant of circumcision; "now shall a month devour them" (ibid.) — this is what is written: "And there arose a new king." "Who knew not Joseph" (Exodus 1:8). But did he not recognize Joseph? Rather, he did not acknowledge what Joseph had done with him in the days of the famine.
Why a New King Arose Over Egypt Who Knew Not Joseph
Midrash Aggadah, Exodus 1:8
ויקם מלך חדש. וכי מלך חדש היה פרעה, אלא מלמד שחדש להם גזירות קשות: ד"א ויקם מלך חדש וגו'. הוא היה פרעה הראשון, אלא אמרו לו נזדווג להם, אמר להם שוטים עד עכשיו היו מושלים בנו ולא היינו מושלים עליהם ואלולי יוסף לא היה לאותם אנשים חיים, ואנו רוצים להזדווג עמהם, מיד הורידוהו מכסאו ועשה ג' חדשים, אחר מכאן אמר להם כל מה שאתם אומרים אני שומע לכם, החזירוהו לכסאו, לפיכך אומר ויקם מלך חדש, הדא הוא דכתיב בה' בגדו כי בנים זרים ילדו (הושע ה' ז'), שהפרו בני ישראל ברית מילה, עתה יאכלם חדש (שם), הדא הוא דכתיב ויקם מלך חדש: אשר לא ידע את יוסף. וכי לא היה מכיר את יוסף, אלא לא ידע אשר עשה עמו בימי רעבון: