best method to solve error in wp