"When You Were My Girl" is a song by English recording artist Matt Cardle. The song was released as a digital download in the United Kingdom on 13 October 2013 as the second single from his third studio album Porcelain (2013). The song was written by Cardle, Will Talbot, Jamie Scott, Toby Smith, JC Chasez, and Jimmy Harry, and it was produced by Cardle, Smith, and Scott.
Talking about the song Matt said: "I had a session in LA with JC Chasez and his producer Jimmy Harry. We came up with this really awesome bass line, which I revisited a few weeks later when I was back in the UK. I continued writing and a few days later, the track was finished." He also said: "It's got a real Marvin Gaye, Jackson-esque type feel to it. I'm really proud of it."
A music video to accompany the release of "When You Were My Girl" was first released onto YouTube on 6 October 2013 at a total length of two minutes and fifty-seven seconds. The video was directed by Nick Spanos and was shot in Los Angeles, United States.