If you are running a release older than 2.5 and you want to upgrade, you should upgrade directly to 2.5.8, referring to the upgrade procedure below.
Upgrading Confluence should be fairly straightforward. We strongly recommend that you back up your confluence.home directory and database before upgrading!
If you are upgrading from Confluence 2.2.x or a later version, please use the Confluence Upgrade Instructions.
If you are upgrading directly from 2.1 or earlier, you should also read the 2.2 Release Notes for warnings about the 2.1 -> 2.2 upgrade.