In this paper, we investigate the effect of basic-flow modification on the absolute instability in a two-dimensional wake at low Reynolds number with the parallel-flow approximation. Using the method of calculus of variation, we investigate how to modify the basic flow to suppress or enhance the absolute instability and suggest an optimal modification of the basic flow for stabilizing a bluff-body wake. In order to validate the present approach, we also measure the sensitivity of all the eigenvalues including the absolute-instability frequency, using the $\epsilon$-pseudo-spectrum, showing that small modifications in the basic flow do not destabilize other eigenvalues by more than the original absolute-instability frequency, at least for the Reynolds number considered here. For a two-dimensional parallel model wake and a circular-cylinder wake, the present approach shows that the positive and negative velocity perturbations to the basic flows, respectively, at the wake centreline and separating shear layer suppress the absolute instability.