In 1831 the new king, William IV, promoted him to the bishopric of Worcester, in fulfilment, as it was understood at the time, of a promise made by the late king. He then gave up his post at St Paul's, being succeeded by Sydney Smith. After the death of the king in 1837, he was replaced as Clerk of the Closet and had no further influence at court.