How to straighten a sagging wooden house?
The process is simple, but actually doing these things may take equipment and expertise that you lack.


Find out WHY the floors are sagging.  Is it due to improper foundation/footings?  Is it due to failed or failing materials?  Is the structure just inadequately design to support itself?
Come up with a remediation plan to fix the issue(s) you identified.
Do those things yourself or hire a contractor with the necessary expertise to take care of them for you.


I'll add that in my experience the most common problem causing floors to sag in an older home is subsidence in the support structure either because they are inadequate or have been undermined.  Usually the process involves jacking up the sagging parts, usually using foundation jacks.  This often needs to take a while because you want to avoid breaking any joists, walls, etc.  Then you shore up (if possible) or remove and replace the failing/failed supports.  After that you let the building down on the new supports.

You will almost certainly end up with plaster cracks and the like but simply putting down new flooring without fixing the root cause is just a waste of time and money.