You probably know that already, just for other readers: The upgrade from 2.5 to 4.0 has to be done in 3 steps that are in-place mini-migrations:
- 2.5 to 3.5.1,
- then to 3.10,
- and finally to 4.0,
All Joomla upgrades/mini-migrations planing can start using this official guide:
docs.joomla.org/Special:MyLanguage/Why_Migrate
And in details from 2.5 to 4.0 is in the official documentation here:
docs.joomla.org/Special:MyLanguage/Planning_for_Mini-Migration_-_Joomla_2.5_to_4.x
Of course always **backup** first (and **test backup** restoration on a different server.
Best is to exercise on a site clone taking detailed notes of actions, and once happy, replace original site by new one (or if site is very dynamic, backing up and redoing the migration offline according to notes taken during exercising).