We study the contribution of quantum phase fluctuations in the superconducting order parameter to the low-temperature resistivity $\ensuremath{\rho}(T)$ of a dirty and inhomogeneous superconducting wire. In particular, we account for random spatial fluctuations of arbitrary size in wire thickness. For a typical wire thickness above the critical value for a superconductor-insulator transition, phase-slip processes can be treated perturbatively. We use a memory formalism approach, which underlines the role played by a weak violation of conservation laws in the mechanism for generating finite resistivity. Our calculations yield an expression for $\ensuremath{\rho}(T)$, which exhibits a smooth crossover from a homogeneous to a ``granular'' limit upon increase of $T$, controlled by a ``granularity parameter'' $D$ characterizing the size of thickness fluctuations. For extremely small $D$, we recover the power-law dependence $\ensuremath{\rho}(T)\ensuremath{\sim}{T}^{\ensuremath{\alpha}}$ obtained by unbinding quantum phase slips. However in the strongly inhomogeneous limit, the exponent $\ensuremath{\alpha}$ is modified and the prefactor is exponentially enhanced. We examine the dependence of the exponent $\ensuremath{\alpha}$ on an external magnetic field applied parallel to the wire. Finally, we show that the power-law dependence at low $T$ is consistent with a series of experimental data obtained in a variety of long and narrow samples, which earlier studies have attempted to fit by an exponential trial function. The values of $\ensuremath{\alpha}$ extracted from the data, and the corresponding field dependence, are consistent with known parameters of the corresponding samples.