Shoppers flocked to the high street in July as the heatwave drove footfall up 0.8% and hit online sales.

Footfall rose from the 0.1% rise recorded in June and represents the fourth month of positive footfall growth since the start of the year, according to the British Retail Consortium (BRC) and Springboard.

The warm weather drove the greatest rise on the high street, up 2.3%, followed by out-of-town, which rose 0.9%. Footfall in shopping centres fell 2.3% in July, an improvement on June’s 3% decline.

The footfall figures back up signs of a retail recovery indicated by a 3.9% increase in total sales in July, reported by the BRC earlier this month.

BRC director general Helen Dickinson said: “It’s encouraging to see that the number of empty shops in the UK has fallen marginally since the record high of the previous quarter. But it’s still a stark statistic, which masks widespread variations – six parts of the UK had above average vacancy rates.

“We’ve seen some cause for cautious optimism since the start of the year, but the path to recovery remains fragile.”

Springboard retail insights director Diane Wehrle said: “For the first time it seems that a longer term improvement in footfall trends might be emerging.”

By contrast, online sales in July fell 2% as shoppers opted for the high street over the laptop, according to the IMRG Capgemini retail index for July.

Sales were up by 9% in the 12 months to July, but dipped in the month itself, making it the worst performance in July on record.

The BRC reported the national town centre vacancy rate in the UK was 11.1% in July 2013, down from April’s high of 11.9%.

Northern Ireland recorded vacancy rate of 18%, against Wales’s 15.9% and Scotland’s 10.1%.