Do coproducts commute with pullback in the category of affine schemes? Let $X\to S, Y\to S$ and $W\to S$ be (affine) morphisms of affine schemes. Is it true that the natural map:
$$(X\times_S W) \sqcup_S(Y\times_SW) \to (X\sqcup_S Y)\times_S W$$
is an isomorphism? Here, $\sqcup_S$ denotes the fibered co-product over $S$. Since the category of affine schemes is isomorphic to the opposite category of commutative rings, we can translate this question into one about rings.
I think I can prove it in the case that $W$ is flat over $S$ but is it true in general? This blog post seems to indicate that it should be true in general but I don't see a proof.
Bonus Question: Is this true for the category of schemes in general?
 A: Yes, this is true for schemes in general and follows from the explicit construction of fiber products of schemes.  Specifically, the fiber product $X\times_S Y$ can be constructed as follows.  Take any covering of $S$ by affine open subschemes, and take any coverings of $X$ and $Y$ by affine open subschemes, each of which is contained in the pullback of one of the sets in your cover of $S$.  Then the products $U\times_T V$ where $U\subseteq X$, $T\subseteq S$, and $V\subseteq Y$ are elements of your open covers will form a covering of $X\times_S Y$ by affine open subschemes, glued together in the "obvious" way.  Indeed, this construction is typically how one proves that fiber products of schemes exist at all (see, e.g., the proof of Theorem II.3.3 in Hartshorne's Algebraic Geometry).
We can also give an explicit description of the coproduct of two schemes (over any base).  A coproduct of two schemes $X$ and $Y$ can be explicitly constructed by taking the disjoint union of the underlying topological space of $X$ and $Y$, which then has an obvious scheme structure by just separately covering $X$ and $Y$ by affines.
Let's now think about $(X\sqcup Y)\times_S W$.  We can cover this scheme by affine open subschemes of the form $U\times_T V$, as in the first paragraph.  But moreover, since $X$ and $Y$ are open and disjoint in $X\sqcup Y$, we can choose our sets "$U$" such that each one is contained in either $X$ or $Y$.  Now notice that when we glue together the affine schemes $U\times_T V$, the ones with $U\subseteq X$ and the ones with $U\subseteq Y$ always have no overlap.  This means that we can equivalently just separately glue together the ones where $U\subseteq X$ and the ones where $U\subseteq Y$, and then take the disjoint union at the end.  This construction exactly gives you $(X\times_S W)\sqcup (Y\times_S W)$, so $(X\sqcup Y)\times_S W\cong (X\times_S W)\sqcup (Y\times_S W)$.  It is now just a small definition chase to see that this isomorphism $(X\times_S W)\sqcup (Y\times_S W)\to (X\sqcup Y)\times_S W$ is indeed given by the natural map.

Alternatively, in the case that everything is affine, there is a simple purely algebraic proof.  Say $X=\operatorname{Spec} A$, $Y=\operatorname{Spec} B$, $W=\operatorname{Spec} C$, and $S=\operatorname{Spec} k$.  Then $(X\sqcup Y)\times_S W$ is Spec of $(A\times B)\otimes_k C$ and $(X\times_S W)\sqcup (Y\times_S W)$ is Spec of $(A\otimes_k C)\times (B\otimes_k C)$.  The fact that the natural map between these is an isomorphism is then nothing but the familiar fact that tensor products of modules distribute over direct sums (since $\times$ here is the same thing as a direct sum, for the underlying $k$-module structure).
