If you find the rot at the base of a post soon enough, you can neutralize it and strengthen the post using epoxy. Scrape away the rotten parts of the wood with a scraper, knife or other sharp tool. If you find that the entire bottom of the post is rotten, that's too big a job for epoxy, but spots here and there can be filled. After you have removed all of the soft, punky and rotten wood, mix up enough epoxy to fill the space and smear it in using a putty knife. Allow it to dry for a day, then sand down the surface so it's flush with the rest of the post.
To replace the bottom of a post, determine how far up the post the rot goes. After supporting whatever is above the post with jack posts, cut away the bottom of the post using a sharp saw, being sure to make a straight cut. Use a piece of rot-resistant softwood such as cedar to make a new piece that is identical to the piece you cut out. Apply adhesive to the ends of the new piece. Attach the new piece to the deck below it and to the original post above it using four-inch deck screws driven at an angle in holes that have been predrilled with a countersinking bit.
To support the roof or deck that is over the post you are working on, place jack posts on both sides of the rotten post and extend them so they are pushing firmly upward against whatever is above. Be sure that the bases of the jack posts are directly over a joist or beam. If you place the bottoms of the jack posts on the porch with nothing substantial underneath them, you could break through the porch when you put pressure on them. Keep the jack posts in place until your work on the permanent post is completed.
Paint the entire replacement piece for the bottom of the post, including the top and bottom, with exterior-grade primer before putting it in place. Using rot-resistant wood and painting it thoroughly will slow down the rotting process and give you a longer period before you will have to do this again. Keep an eye on the area and reroute gutters and downspouts if they are frequently making it wet. Water is the main cause of wood rot, and wood that is kept consistently dry will last far longer.