The opening lines of the song are taken from the catchphrase of English music hall performer Charlie Chester. Chester's catchphrase was "Down in the jungle living in a tent, better than a bungalow, no rent"; the lyrics changed this to "Down in the jungle living in a tent, You don't use money you don't pay rent".
The song was recorded during the album sessions in Lagos, Nigeria. The studio suffered a power outage during the session, but the recording continued with backup generators. Additional overdubs were later done in London.
McCartney had not played the song live until a free concert on 14 June 2008 in Kiev, Ukraine, on account of it receiving the most requests in a web poll. McCartney played the song in his concert for Quebec City, and then at Hayarkon Park in Tel Aviv, Israel, on 25 September 2008, his first show in Israel. It became a fixture in his setlist, as he also performed the song in Halifax, the first show of his 2009 summer tour, as well as in his three July 2009 performances at the Citi Field in New York City. In addition, the song was featured in his Up and Coming Tour in 2010, his On the Run Tour in 2011-12, and most of his Out There! Tour in 2013. It was dropped for the performances in Japan at the end of the latter tour in November 2013.