Brock Holt also had four hits and Bogaerts drove in two runs as the last-place Red Sox took three of four from Toronto. Boston had a season-high 19 hits.
Mookie Betts had two hits before teammate Wade Miley (8-7) threw a pitch. Miley won for the third time in four starts and snapped a five-start losing streak against AL East opponents. Miley allowed four runs and seven hits in five innings, walking a season-high seven.
Ortiz hit a three-run homer in Boston's opening inning and Ramirez followed with a second-deck blast, the fourth time this season the Red Sox have gone back-to-back.
Blue Jays starter Matt Boyd didn't record an out in his second big league start, leaving after the first seven batters reached safely.