The Office for National Statistics said Consumer Prices Index inflation rose to 2.9% in July, up from a 15-month low of 2.6% in June.