Let Ω⊂Rn be an unbounded open set. We consider the generalized weighted Morrey spaces Mp(.),φω(Ω) and the vanishing generalized weighted Morrey spaces VMp(.),φω(Ω) with variable exponent p(x) and a general function φ(x,r) defining the Morrey-type norm. The main result of this paper are the boundedness of Riesz potential and its commutators on the spaces Mp(.),φω(Ω) and VMp(.),φω(Ω). This result generalizes several existing results for Riesz potential and its commutators on Morrey type spaces. Especially, it gives a unified result for generalized Morrey spaces and variable Morrey spaces which currently gained a lot of attentions from researchers in theory of function spaces. © 2019 Element D.O.O. All Rights Reserved.