If your cough persists for more than a few weeks and you find that you’re coughing up thick, green or yellow phlegm, accompanied by fever, shortness of breath, or wheezing – call your doctor immediately. In the meantime, try to drink warm, soothing fluids like tea and get adequate rest.