PHILADELPHIA -- Todd Frazier just needed to see his favorite opponent to end his slump.
Michael Conforto also went deep for the Mets, who also snapped a six-game losing streak in Philadelphia.
The Phillies fell 3 1/2 games behind the Cubs for the second wild-card spot in the NL. The Mets are five games back.
"It felt good," said Frazier, who was 5 for 30 during New York's homestand. "It was a good team win."
Five of Frazier's 18 homers this season are against the Phillies.
"Sometimes you can tell when guys are coming out of it, and I had a feeling he would be," Mets manager Mickey Callaway said. "This guy, he comes to play every day. Good results, bad results, he just wants to win. So I'm happy for him. That was big."
Pete Alonso led off the eighth with a single off Mike Morin (1-1) and Conforto reached on an infield single. After J.D. Davis popped out, Joe Panik walked to load the bases. Amed Rosario then lined a two-run single up the middle to give the Mets a 3-1 lead. Jared Hughes came in and Frazier ripped his 17th homer to left to make it 6-1.
Justin Wilson (4-1) tossed a scoreless inning for the win after Wheeler gave up one run and seven hits in six innings
Conforto's two-run shot off Edgar Garcia in the ninth was his 28th this season and 18th in his career against Philadelphia. Frazier connected a few batters later for his 10th career multihomer game.
Nola allowed one run and four hits, striking out seven in 6 1/3 innings.
"Every game is so valuable right now, especially when Nola pitches," Phillies manager Gabe Kapler said. "We have to support him early. It's very disappointing. When Nola pitches, we expect to win."
Nola took a two-hitter into the seventh before running into trouble. He walked Davis to start the inning and Panik singled. After Rosario popped out, Frazier was hit by pitch to load the bases. Pinch-hitter Wilson Ramos lined an RBI single that tied it at 1 and extended his career-best hitting streak to 23 games.
"It's frustrating," Nola said. "The seventh inning hurt me."
The Mets were happy to see him gone.
"You just understand he's making his pitches, but hopefully you can get him out before nine and beat up on the bullpen," Callaway said. "That's exactly what our team did."
J.T. Realmuto had two sacrifice flies for the Phillies.
Nola has a 2.21 ERA and has held opponents to a .183 batting average in his last 14 starts.
The Mets improved to 47-28 at Citizens Bank Park since 2012. They are 14-8 on the road since the All-Star break.
Mets: 2B Robinson Cano will begin a rehab assignment Saturday at Class A Brooklyn. Cano suffered a torn left hamstring four weeks and was expected to miss between six to 12 weeks. There's still no timetable for his return.
"He feels like he's in a good spot," Callaway said. "The performance staff feels like he's ready to do this. This is a big step for him."
More AP baseball: www.apnews.com/MLB and www.twitter.com/AP-Sports
Astros ace Justin Verlander donating paycheck during shutdown
Astros ace Justin Verlander says he'll give his weekly paycheck to coronavirus relief efforts during the shutdown.
MLB relaxes scouting restrictions ahead of draft
Teams can now contact amateur prospects digitally and gather data and video on players, but they remain barred from attending any in-person activities.
Sources: President Donald Trump says NFL season should start on time
President Donald Trump told the commissioners of 12 major sports that he hopes to have fans back in stadiums and arenas by August and September, sources told ESPN.
Yankees, Red Sox make history with 12 runs in the 1st
Both Aaron Hicks and Michael Chavis hit home runs in a combined 12-run 1st inning for the Red Sox and Yankees, marking the first game of its kind since 1989.
We'll miss MLB's London Series, which gave us the weirdest game of 2019
The game that would be the hardest to explain to a first-time baseball watcher last year was, almost certainly, the one viewed by the most first-time baseball watchers.
Anniversary of Mets signing Seaver recalls funny Ali story for Kurkjian
On April 3, 1966, the Mets signed Tom Seaver, and that reminds Tim Kurkjian of a Seaver story that involves Dick Schaap and Muhammad Ali.