The variational iteration method is used to deal with linear and nonlinear differential equations. The main characteristics of the method lie in its flexibility and ability to accurately and easily solve nonlinear equations. In this work, a general framework is presented for a variational iteration method for the analytical treatment of partial differential equations in fluid mechanics. The Caputo sense is used to describe fractional derivatives. The time-fractional Kaup-Kupershmidt (KK) equation is investigated, as it is the solution of the system of partial differential equations via the Boussinesq-Burger equation. By comparing the results that are obtained by the variational iteration method with those obtained by the two-dimensional Legendre multiwavelet, the optimal homotopy asymptotic method (OHAM), the q-homotopy analysis transform method, the Laplace Adomian Decomposition Method, and the homotopy perturbation method, the first method proved to be very effective and convenient. The main methodology in this work is anticipated to be applied to various fractional calculus, linear, and nonlinear problems.