The pressure and temperature effects on the optical responses involving the $$1s-1p$$ 1s-1p intersubband transition of an exciton in a spherical quantum dot are investigated. Calculations are performed in the framework of the effective mass approximation and the energies are obtained by using a Ritz variational method. Our approach is based on the Hylleraas formalism were the correlations between the electron and hole are taken into account. Temperature, pressure and the size effects on the linear and third nonlinear optical properties are analyzed. Our results show that the temperature and pressure provide important effects on linear and nonlinear parts of the absorption coefficient (AC) and the relative refractive index change (RI) associated to the $$1s-1p$$ 1s-1p transition. We found that by increasing the temperature and pressure the AC and RI curves shift to lower and higher energies respectively. Calculations show also that the dot size affects considerably the AC and RI and their corresponding amplitude.