To prevent root roting, first plant your vegetables and flowers in a good soil, with not too much clay and not too much sand on it, and with lots of fine organic matter. Peat moss is very good to keep constant humidity. Keep watering constant and not irregular. Root roting will occur if plants are growing slowly or are small, and if watering is irregular.
Gnats often only affect plants growing indoors and can rapidly become a pest. Gnats like wet breeding grounds, with organic matter. One way of controlling a pest, is by keeping a layer of sand over the soil around the plant, rather than organic matter. Let the soil dry between waterings. Keep a jar with apple cider vinegar to attract and drown the insects. You can also spread oil over the surfaces, to kill the insects, or sticking labels. If nothing works, you will need to repot the plants in sterile soil.
To control aphids, first wash them throughly with a strong jet of water, and wash your plants with soap, before rinsing. Change place of the plant, and make sure you keep the plant healthy and not too dry and warm. Also plant herbs that attract aphids to send them away from the other flowers and vegetables. Plants like basil attract aphids.
To control maggots, worms in cabbage plants, first plant the vegetables mixed with other plants and flowers, to confuse the butterflies that lay their eggs. Spray compost tea over the plants to repel the pest. If larvae affect the roots, you may need to replant the vegetables. Plant garlic and other repelent herbs around your cabbage plants.
To control slugs, you may have to create dry conditions and remove mulching around plants. Put sharp plastic or sawdust around the plants, because slugs do not like these barriers. If necessary go picking them at night after wet weather.
If plants are weak or growing very slowly, change their place of growing, watch out for potential pests, repot or replant in new soil. Give some fertilizer, such as compost, diluted urine, or spray with compost tea. Keep humidity constant, not too much wet or dry. Another potential cause is a temperature not good for the plant: too much hot for some, too much cold for others.