We present a theoretical study of the binding energy of an exciton in a cylindrical quantum well wire subject to an external magnetic field. Calculations are performed using a variational approach within the effective mass approximation. We describe the effect of the quantum confinement by an infinitely deep potential well taking into consideration the interaction between the charge carriers (electron and hole) and the optical phonons. It is shown that the polaronic correction to the exciton binding energy is important and should not be neglected. The confinement introduced by a magnetic field, in addition to the geometrical one, is also discussed.