Viral pneumonia rarely requires a trip to the hospital. Antibiotics don’t work against viral pneumonia. But you may still get it for any bacterial infection that you may also have. Be sure to take all of your medication, even if you feel better. If you stop taking the medicine too early, the infection can come back and may be harder to treat.