AbstractWe classify all tilting classes over an arbitrary commutative ring via certain sequences of Thomason subsets of the spectrum, generalizing the classification for noetherian commutative rings by Angeleri, Pospíšil, ŠÅ¥ovíček and Trlifaj (2014). We show that the n-tilting classes can equivalently be expressed as classes of all modules vanishing in the first n degrees of one of the following homology theories arising from a finitely generated ideal: {\operatorname{Tor}_{*}(R/I,-)}, Koszul homology, Čech homology, or local homology (even though in general none of those theories coincide). Cofinite-type n-cotilting classes are described by vanishing of the corresponding cohomology theories. For any cotilting class of cofinite type, we also construct a corresponding cotilting module, generalizing the construction of Šťovíček, Trlifaj and Herbera (2014). Finally, we characterize cotilting classes of cofinite type amongst the general ones, and construct new examples of n-cotilting classes not of cofinite type, which are in a sense hard to tell apart from those of cofinite type.