Motivated by current interest in strongly correlated quasi-one-dimensional (1D) Luttinger liquids subject to axial confinement, we present a novel density-functional study of few-electron systems confined by power-low external potentials inside a short portion of a thin quantum wire. The theory employs the 1D homogeneous Coulomb liquid as the reference system for a Kohn-Sham treatment and transfers the Luttinger ground-state correlations to the inhomogeneous electron system by means of a suitable local-density approximation (LDA) to the exchange-correlation energy functional. We show that such 1D-adapted LDA is appropriate for fluid-like states at weak coupling, but fails to account for the transition to a “Wigner molecules” regime of electron localization as observed in thin quantum wires at very strong coupling. A detailed analyzes is given for the two-electron problem under axial harmonic confinement.