Miles Mikolas won his fifth straight decision to begin the season and Pham homered in his return from a groin injury, sending the Cardinals past the San Diego Padres 2-1 on Thursday night.
Mikolas (5-0) allowed one run in 6 2/3 innings against his former team, lowering his ERA to 2.51. The right-hander had never faced the Padres, who drafted him in 2009 and used him as a reliever from 2012-13.
And though Mikolas issued his first walk in three games, he allowed fewer than three runs for the fourth consecutive start.
Padres cleanup man Franchy Cordero had three of the five hits against Mikolas.
A home run by Raffy Lopez chased Mikolas in the seventh and was the only extra-base hit against him.
Pham, who had missed four games, singled and scored in the first inning on Jose Martinez's sacrifice fly and homered in the fifth for the Cardinals' only extra-base hit. Both hits came against Jordan Lyles (0-1).
Jordan Hicks got the final out of the seventh and Greg Holland worked a scoreless eighth.
Cardinals left fielder Marcell Ozuna aided Mikolas in the fourth by throwing out Jose Pirela trying to stretch a single off the left-field wall.
After each of Cordero's singles, Mikolas retired Chase Headley, once on a double-play grounder.
Lyles, swapping roles with Mitchell, got the start Thursday and worked five innings. He allowed five hits.
Pham's sixth home run, off a hanging breaking ball in the fifth, was a 371-foot line drive over the left-field wall.
Luke Weaver (2-2, 5.50 ERA) has given up at least four runs in each of his last four starts.
Eric Lauer (1-1, 5.79) will make his fourth career start. Last time out, he earned his first win with six scoreless innings against the Dodgers in Mexico.
>>Cardinals Place RHP Martinez on DL
Placed ace Carlos Martinez on the 10-day disabled list because of a strained lat. The right-hander leads the National League with a 1.62 ERA. RHP Mike Mayers was recalled from Triple-A Memphis.