It took a trip to the minors to fix Chad Green earlier this season.

The Yankees are counting on a similar trip to do the same for Jonathan Holder.

The right-hander was optioned to Triple-A Scranton/Wilkes-Barre after another dreadful outing in Monday’s 10-8 win over the Blue Jays. Holder allowed five runs — and two homers — without retiring a batter.

“Tonight was embarrassing,’’ Holder said following the victory — but before the Yankees announced the move.

They were fortunate to survive Monday, as Holder let Toronto back into what had looked like a rout when the Yankees went up by eight runs with a seven-run sixth. Manager Aaron Boone was forced to go to Green — who had been in line to open Tuesday’s game against the Blue Jays — with the Yankees still down a starter.

It was just the latest egg laid by Holder, who has given up 13 runs — all earned — over just 5 ¹/₃ innings in his past six outings. He’s also allowed six homers in that span in what has mostly been a disappointing season.

“It’s tough,’’ said Holder, who blamed a lack of fastball command for most of his problems. “I’ve never struggled like this. It’s something new for me. This whole season has been a grind for me and I’ve got to go figure something out with [pitching coach] Larry [Rothschild].’’

In theory, Holder’s season could still possibly be salvaged, as Green’s was in April.

Over his first 10 outings, Green compiled a 16.43 ERA by giving up 14 runs in 7 ²/₃ innings and bottomed out when opposing teams scored seven runs off him in just one-third of an inning in his two games before being sent down.

Green has been a different pitcher since his return May 12 and has been especially effective lately being used as an opener, retiring 21 of the last 25 batters he faced in his new role before Monday.

Holder, though, impacted the entire bullpen after six solid innings from CC Sabathia and a shutout frame from Tommy Kahnle.

Lourdes Gurriel Jr. homered to open the eighth against Holder. Cavan Biggio — son of Hall-of-Famer Craig Biggio — singled, as did Randal Grichuk and Rowdy Tellez to load the bases.

After a visit from Rothschild, Holder then gave up a grand slam to Freddy Galvis that cut the Yankees’ lead to 10-7, which is when Boone went to Green.

Green struck out the first two batters he faced, but consecutive infield hits forced him from the game, as Boone kept an eye on Tuesday’s game and the possibility of Green starting.

Adam Ottavino finally ended the inning and Aroldis Chapman closed it.

“Something’s got to change,’’ Holder said. “I’ve got to get better.”

He’ll have to do it in the minors.