Power-wash the porch to clean it. Remove mold and other stains by using a scrub brush dipped in a solution of water and bleach or trisodium phosphate. Allow the porch to dry.
Examine the railings for signs of damage or rot. If the rot has spread throughout the railing or spindles, remove the rotten pieces. Purchase replacement spindles at a home improvement or hardware store. If you can't find spindles that match, take one of them to a woodworking shop so replacement spindles can be fabricated.
Fill damaged areas such as nicks or holes with wood putty and a putty knife. If you find areas with rotten wood, patch them rather than replace the whole piece. Remove rotten wood with a trim router or rotary cut-out tool. Cover the wood with an epoxy-bonding agent and fill the hole with epoxy. Let it cure overnight.
Sand any spots where you applied wood putty or epoxy until they are smooth. Wipe off the dust with a dry rag.
Remove chipped or flaking paint with a putty knife, then sand the edges of the chipped paint smooth. Wipe off the dust with the dry rag.
Nail any loose boards or spindles into place with a hammer and finish nails.
Apply primer on areas of bare wood, wood putty or epoxy, then allow the primer to dry on the porch railing.