Weight-bearing following the surgery may be partial or full, depending on the surgeon’s approach. A critical part of the question is whether the surgeon uses a cemented or uncemented device when performing the procedure.
Years ago, total knee surgery frequently required six to eight weeks of walking with a cane, crutches or walker, but if the cemented approach is used, you can put weight on the leg almost immediately. Typically, you will use an assistive device for a few weeks as needed, often beginning with a walker or two crutches and soon transitioning to a single crutch (under the opposite arm/side) or cane (again, in the opposite hand/side).
Physical rehabilitation will begin in the hospital almost immediately. Since mobility is essential, you may be fitted with a continuous motion machine that will slowly straighten and bend your knee as you lie in bed, allowing you to pedal and pump your ankles to promote blood flow in your legs, and regain range of motion and muscular control of the knee.
When you go home, you will continue the exercise program so you can progress. Most programs include walking short distances several times daily. If your knee becomes sore after your walks, use a cold pack and decrease the distance of your walks but do not stop. Sticking to your exercise regimen is vital to your continued improvement and ultimate recovery.