The implementation of technique for full structural optimizations of complex periodic systems in the DFT-PAW package VASP, including the volume and shape of the unit cell and the internal coordinates of the atoms, together with a correction that allows an appropriate modeling of London dispersion forces, as given by the DFT-D2 approach of Grimme [Grimme, S. J. Comp. Chem. 2006, 27, 1787], is reported. Dispersion corrections are calculated not only for the forces acting on the atoms, but also for the stresses on the unit cell. This permits a simultaneous optimization of all degrees of freedom. Benchmark results on a series of prototype systems are presented and compared to results obtained by other methods and experimental data. It is demonstrated that the computationally inexpensive DFT-D2 scheme yields reasonable predictions for the structure, bulk moduli, and cohesive energies of weakly bonded materials.