Wainwright gave up six hits in his second spring start and struggled with his fastball.
After rain held up play for 55 minutes, Wainwright went to the indoor batting cages for more work. Pitching coach Derek Lilliquist noticed a flaw in Wainwright's mechanics and the correction produced positive results.
Jason Heyward hit his first home run with St. Louis.
Marlins starter Henderson Alvarez allowed two runs and four hits in three innings.