The short answer
Modernize if the system's rules are still right and its problems are mainly technical. Rebuild if its design is what blocks the business, or if nobody can safely change it. Replace it with a package if the work is now standard. Most real cases are a mix, so decide part by part, and avoid a single big switch where you can.
Swipe the table to see every column.
| Option | What it means | Fits when | Main risk |
|---|---|---|---|
| Keep and protect | Patch, back up, restrict access, and document | It works and little needs to change | Risk builds if support has ended |
| Upgrade | Move to supported versions and hosting | The code is sound and only the platform has aged | Upgrades can expose hidden problems |
| Refactor | Improve the code while keeping its behaviour | The rules are right, but changes are slow | Effort with little visible business change |
| Rebuild in phases | Replace parts one at a time | The design blocks the business, which cannot stop | Running two systems for longer |
| Rebuild all at once | New system with one cutover | The system is small and a pause is possible | Everything is at risk on one day |
| Replace with a package | Buy software and migrate | The process is no longer unusual | Adapting how you work |

