You will probably need to upgrade your database simply by following the process and clicking upgrade.
Final Step: You may need to: Tip: To avoid losing any custom changes you make to the Word Press core files after you update, you may consider creating your own child theme which will save all your custom coding in a separate directory and therefore not be overwritten when you update to the latest version in the future.
Just remember to retain a backup of a working site so that you always have a fallback position.
If you plan on upgrading across more than two major releases, you should consider upgrading incrementally to avoid potential conflicts and minimize the risks of database damage.
This is just an alternative method to using the in-dashboard update method – For other commands and examples, you can check out the official WP-CLI plugin documentation.For example, if you plan on upgrading from 2.5 to 4.9.7, upgrade to 2.7 first, followed by 2.9, then 3.1, and so on. Older versions of Word Press can be downloaded from the release archive.Please note that Word Press 3.7 introduced an easy to use one-button updater which will take you directly to 4.9.7.Note, if you are running a customized theme you will lose any customizations if you simply overwrite your theme with a new one.In this case you will need to work with a developer to integrate your customizations into your new Word Press theme instead of just overwriting the old theme.