This signified a recovery from the previous month, which saw a 0.5% decrease in the quantity of items purchased.
When compared with the same month last year, the quantity bought in July 2018 increased by 3.5% when compared with the slower growth of 1.1% in July 2017.
The quantity bought in non-store retailing showed strong growth both on the month and year-on-year at 4.9% and 16.9% respectively.
Feedback from non-store retailers suggested that online promotions further encouraged sales, while non-food stores reported a reduction in footfall in July 2018.
Spending online continued to increase accounting for a record 18.2% of all retail sales in July 2018. Department stores also saw strong growth, with a record contribution of 18.2% to retail sales.
Rhian Murphy, ONS senior statistician, said: “Many consumers stayed away from some high street stores in July, but online sales were very strong, supported by several retailers launching promotions. Food sales remained robust as people continued to enjoy the World Cup and the sunshine.”