DENVER — On the mound, Adam Wainwright likes to own the inside part of the plate.

As he’s only recently discovered, crowding it is a pretty good approach for hitting, too.

Although shaky on the hill, Wainwright shined in the batter’s box with a career-high four RBIs as the St. Louis Cardinals beat the Colorado Rockies 10-5 on Tuesday night to move into a three-way tie for the two NL wild cards.

Wainwright credits inching just a little bit closer for his newfound prowess at the plate.

“My whole career, I’ve fought trying to pull the ball and tried to stay up the middle and hit the ball to right field. It just doesn’t work for me very well,” explained Wainwright, who has 18 RBIs this season. “If it’s a pitch in the strike zone, I’m going to swing at it.”

The free-swinging Wainwright lined a two-run double in the second inning and brought in two more with a bloop single in the fifth. Matt Adams and Jedd Gyorko homered for the Cardinals, now even with the Mets and Giants in the race for the final two NL playoff spots.

The 35-year-old Wainwright (12-9) didn’t have his sharpest command, yielding solo homers to Daniel Descalso, Charlie Blackmon and Gerardo Parra. But the right-hander was sharp enough — especially his curveball — as he gave up four runs in 5 1/3 innings.

“In a park like this, in a place where no lead is safe, a pitcher, if you can go out there and push something across … you’re doing your job,” Wainwright explained.

Jorge De La Rosa (8-9) struggled through what could be his final start in a Rockies uniform. The winningest pitcher in team history allowed eight runs — seven earned — in 4 2/3 innings. His contract expires after this season.

“It looked like he just didn’t have a lot of depth to his stuff,” Rockies manager Walt Weiss said.

Wainwright became the second straight Cardinals pitcher to play a starring role at the plate. Carlos Martinez had a two-run double in a 5-3 win on Monday.

These days, Cardinals manager Mike Matheny just can’t help but scoreboard-watch. It’s hard to miss, since the scores are posted on the right-field fence and he stares at it from the dugout.

And yes, he saw it when the Mets game went final.

“Just keep playing our game,” Matheny said. “Not get caught up.”

Adams had a solo homer in the second and Gyorko added a two-run shot in the fourth — a 452-foot no-doubter to center. Gyorko has 27 homers this season.

DJ LeMahieu’s average remained at .349 after he went 1 for 3 with a double. He holds a slight lead over Washington’s Daniel Murphy in the NL batting race. Murphy is hitting .347.

TRAINER’S ROOM

Cardinals: OF Matt Holliday (broken right thumb) said of his potential return: “I will be ready as fast as I can. To put a date on it doesn’t make sense.” … INF Matt Carpenter got the night off.

Rockies: Third base coach Stu Cole was hit in the head by a ball that caromed off another during batting practice. He checked out OK after being taken to the hospital. The Rockies moved Eric Young over to coach third, and Vinny Castilla served as the first base coach.

MIGHTY BLOW

Holliday good-naturedly admitted he hasn’t received a bill for breaking the glass at a burger joint behind the left-field seats during batting practice Monday.

Then again, the restaurant — Helton Burger Shack — does bear the name of his good friend, longtime Rockies first baseman Todd Helton.

Holliday’s drive shattered the window pane protecting the prep area.

“That was collateral damage,” joked Holliday, who was with the Rockies from 2004-08. “Maybe now they will put in Plexiglas.”

THIS & THAT

Wainwright has 133 wins and is one from tying Dizzy Dean for sixth on St. Louis’ career list. … Randal Grichuk had three hits, including two doubles, and scored four times. … De La Rosa is 53-20 with a 4.31 ERA at Coors Field in 106 games with Colorado, including 99 starts. “He’s the poster boy for showing that you can pitch in an offensive park here at altitude,” Weiss said.

UP NEXT

The Cardinals will send RHP Luke Weaver (1-3, 3.21 ERA) to the mound in the series finale Wednesday. The Rockies counter with righty German Marquez (0-0), who will make his first major league start after three relief appearances.