The GVW algorithm is an effective algorithm to compute Gröbner bases for polynomial ideals over a field. Combined with properties of valuation domains and the idea of the GVW algorithm, we propose a new algorithm to compute Gröbner bases for polynomial ideals over valuation domains in this study. Furthermore, we use an example to demonstrate the improvement of our algorithm.