The quantum correction to the conductivity in disordered quantum wires with linear Rashba spin-orbit coupling is obtained. For quantum wires with spin-conserving boundary conditions, we find a crossover from weak anti- to weak localization as the wire width W is reduced using exact diagonalization of the Cooperon equation. This crossover is due to the dimensional dependence of the spin relaxation rate of conduction electrons, which becomes diminished, when the wire width is smaller than the bulk spin precession length $L_{SO}$. We thus confirm previous results for small wire width, $W/L_{SO}<= 1$ [PRL98,176808(2007)], where only the transverse 0-modes of the Cooperon equation had been taken into account. We find that spin helix solutions become stable for arbitrary ratios of linear Rashba and Dresselhaus coupling in narrow wires. For wider wires, the spin relaxation rate is found to be not monotonous as function of wire width: it becomes first enhanced for W on the order of the bulk $L_{SO}$ before it becomes diminished for smaller wire widths. In addition, we find that the spin relaxation is smallest at the edge of the wire for wide wires. The effect of the Zeeman coupling to the magnetic field perpendicular to the 2D electron system is studied and found that it shifts the crossover from weak anti- to weak localization to larger wire widths $W_c$. When the transverse confinement potential of the quantum wire is smooth (adiabatic), the spin relaxation rate is found to be enhanced as W is reduced. We find that only a spin polarized state retains a finite spin relaxation rate in such narrow wires. Thus, we conclude that the injection of polarized spins into nonmagnetic quantum wires should be favorable in wires with smooth confinement potential. Finally, in wires with tubular shape, corresponding to transverse periodic boundary conditions, we find no reduction of the spin relaxation rate.