It is said that `` Wonderwall '' was written for Gallagher 's then-girlfriend , Meg Mathews . It is often claimed that `` Wonderwall '' was written for Gallagher 's then-girlfriend , Meg Mathews ( Gallagher married Mathews in 1997 ; the couple divorced four years later ) .