How to characterize equational theories $T$ which have the following property: for any two terms $t(x_1,...,x_n)$ and $t'(x_1,...,x_n)$ in the signature of $T$, if for any closed terms (i. e. terms without variables) $c_1$, ..., $c_n$ the identity $t(c_1,...,c_n)=t'(c_1,...,c_n)$ follows from (the identities of) $T$ then so does $t(x_1,...,x_n)=t'(x_1,...,x_n)$.
In algebraic terms this means to characterize those varieties of algebras which are generated by their initial algebra (the free algebra on the empty set).
The only widely known example of this that I was able to come up with is the theory/variety of Boolean algebras. But in fact any algebra $A$ in any signature generates its own variety of this kind, by adding to the signature a bunch of constants in the well known way and then generating the subvariety by $A$ itself.
So I am interested in any "intrinsic" (say, category-theoretic) characterization of theories/varieties with the above property, as well as in any other familiar examples of such.
May one hope to actually classify such things up to, say, categorical equivalence?