Hector Neris, Austin Davis, Adam Morgan, Tommy Hunter, Aaron Loup and Seranthony Dominguez picked up the slack for the struggling Vince Velasquez (31 of 63 pitches for strikes in 2 1/3 ineffective innings) by allowing only a combined six hits, no walks, one unearned run and four strikeouts in 6 2/3 innings.

Former starter Scott Kingery hit the go-ahead sacrifice fly as a pinch hitter in the sixth.

With the Phillies scuffling for runs — six scored in last five losses during the seven-game stretch and the club going from one game ahead in the National League East to two games behind entering Wednesday — who could blame Kapler?

It worked as the Phillies produced seven runs on 12 hits, including a career-best three extra-base hits by Wilson Ramos in his debut.

It allowed the Phillies to stay within two games of the red-hot Braves, who have won five in a row, and one game ahead of the Cardinals for the second wild-card spot.

Kapler used 20 of his 25 players, including a starting pitcher, Nick Pivetta, as a pinch hitter, to reverse the club’s recent fortunes.

“We did make some aggressive decisions tonight,” Kapler said. “We have to play to win every single baseball game.

“We had the confidence that if we hang around, we would swing the bats like we did.

“There’s a lot to be excited about after tonight’s win.”

Ramos’ Phillies debut was as impressive, he said, as his major league debut when he had four hits in a May 2, 2010, game for Minnesota at Cleveland.

“What a Phillies debut,” Kapler said. “Simply was heroic today on the bases, at plate. He fits right into the Phillies style of offense: long at-bats, putting balls in play, finding the gap.

“And, he had a real calming presence on our pitching staff.”

The Phillies’ stellar effort on the mound started with a guy who was booed out of town in late June.

Neris posted 18 scoreless outings in 19 Triple-A games with the IronPigs and rediscovered his confidence in the splitter.

His splitter finished off Rafael Devers when the Red Sox were up 3-0 and had the bases loaded in the third inning.

“It’s ironic Hector Neris saved the game for us,” Kapler said. “He came in to a spot when the game was about to get out of hand and got a popout and a punchout with some nasty splits.

“This is a guy who went to Triple-A for us, had a pride-swallowing moment, worked his tail off to get his stuff back and executed beautifully for us.

“We definitely don’t win without the contributions of Hector.”

Six other relievers followed Neris, with Hunter (4-2) getting the win and Dominguez his 13th save by retiring all four hitters he faced.

Kapler relished the way the game played out because it made him feel like he had to be involved in the game from nearly the start.

The moves played out after Velasquez walked Boston pitcher Nathan Eovaldi on five pitches, then hit Andrew Benintendi on an 0-2 pitch in the third.

“That one was a lot of fun, I can tell you that. Any time the action starts early and you’re starting to make decisions early in the game and you’re thinking about tomorrow’s game and the doubleheader and all of that all at once, it’s really stimulating and invigorating and I think that’s how we all felt in the dugout tonight – invigorated.​”

Ramos’ first hit as a Phillie, an RBI double, turned the tide. It reduced the Red Sox’ lead to 3-1 in the fourth.

The catcher then delivered his first triple (second of his career) since May 20, 2011. He scored the go-ahead run three batters on Kingery’s sac fly.

Ramos’ two-run double in the seventh gave the Phils a 6-3 cushion.

“Today is a special debut for me in my Phillies debut,” he said. “I put this game in the same [place] as my MLB debut.

“It made me feel excited. I wanted to show everybody here what I can do.”

Wednesday’s flurry of lineup card changes likely is only a snapshot of what’s to come in September, when the Phillies could carry as many as 10 extra players.

It likely means more games like Wednesday against baseball’s best team.

It means more drama.

It means the potential is there for more memorable moments like the one Ramos had.