<s>[INST] Whether Ricci flow keep the diagonal of metric and Ricci tensor? Consider Ricci flow on a compact smooth Riemannian manifold $(M,g(t))$,the Ricci tensor is $Ric(t)$. Then , they meets 
$$
\partial_tg_{ij}=-2R_{ij}  \\
\partial_tR_{ik}=\Delta R_{ik}+2g^{pr}g^{qs}R_{piqk}R_{rs}-2g^{pq}R_{pi}R_{qk}
$$
If at $t=0$, the metric and Ricci tensor is diagonal, namely , $g_{ij}(0)=0 ~R_{ij}(0)=0~,~i\ne j$ , whether the metric and Ricci tensor keep diagonal under Ricci flow ? 
 [/INST] (I apologize for the delayed response.  I thought I had a counter example in an old set of notes but was unable to find it/them.  As a result, this is probably not the simplest counter example.)
As indicated in the comments, the answer to the question is `no.'
Let $\mathfrak{h}$ be a  four-dimensional Lie algebra with basis $X_{1}, X_{2}, X_{3},$ and $X_{4}$ and Lie algebra structure generated by the non-trivial brackets
\begin{align*}
\left[X_{1}, X_{2}\right]&= (3/2)\,{\frac {3+2\,\sqrt {2}}{ \left( 1+\sqrt {2} \right)  \left( 2+
\sqrt {2} \right) }}
X_{2} 
 + (1/2)\,{\frac {5+4\,\sqrt {2}}{2+\sqrt {2}}} X_{3},\\
\left[X_{1}, X_{3}\right]  &= (1/2)\,{\frac {1+2\,\sqrt {2}}{2+\sqrt {2}}} X_{2} - (3/2)\,{\frac {1+\sqrt {2}}{2+\sqrt {2}}} X_{3},\\
\left[X_{1}, X_{4}\right] &= X_{4},
\end{align*}
with corresponding simply-connected Lie group $H$.
Denoting the co-frame dual to the indicated basis by $\omega^{1}, \omega^{2}, \omega^{3},$ and $\omega^{4}$, suppose that 
$$
g = \alpha \omega^{1} \otimes \omega^{1} + \beta \omega^{2} \otimes \omega^{2} + \gamma \omega^{3} \otimes \omega^{3} + \delta \omega^{4} \otimes \omega^{4}
$$
is a diagonal left-invariant metric.
Calculating the Ricci tensor of $g$ one finds that $Ric\left[g\right] =R_{ij}\omega^{i}\otimes\omega^{j}$ is not diagonal. (For simplicity, I will record only the non-diagonal terms of $Ric\left[g \right]$). The non-diagonal terms of $Ric\left[g\right]$ are
$$
R_{23} = R_{32}= (7/4)\,{\frac { \left( -\beta+\gamma \right)  \left( 7+5\,\sqrt {2}
 \right) }{ \left( 2+\sqrt {2} \right) ^{2} \left( 1+\sqrt {2}
 \right) \alpha}}.
$$
The Ricci tensor of $g$ will thus be diagonal if $\gamma = \beta$. 
Supposing now that $g$ is of the form
$$
g = \alpha \omega^{1} \otimes \omega^{1} + \beta \omega^{2} \otimes \omega^{2} + \beta \omega^{3} \otimes \omega^{3} + \delta \omega^{4} \otimes \omega^{4},
$$
we find that the Ricci tensor $Ric\left[g\right]=R_{ij}\omega^{i} \otimes \omega^{j}$ is diagonal with component functions
\begin{align*}
R_{11}&= -\frac{11}{2}\\
R_{22}&= -3\,{\frac {\beta\, \left( 24+17\,\sqrt {2} \right) }{ \left( 1+\sqrt 
{2} \right) ^{2} \left( 2+\sqrt {2} \right) ^{2}\alpha}}\\
R_{33}&= 3\,{\frac {\beta\, \left( 4+3\,\sqrt {2} \right) }{ \left( 2+\sqrt {2}
 \right) ^{2}\alpha}}\\
R_{44}&= -{\frac {\delta\, \left( 4+3\,\sqrt {2} \right) }{ \left( 1+\sqrt {2}
 \right)  \left( 2+\sqrt {2} \right) \alpha}}.
\end{align*}
If the Ricci flow $g(t)$ were to keep both the metric diagonal and the Ricci tensor diagonal, then it would have to be of the form
$$
g(t) = \alpha(t) \omega^{1}\otimes \omega^{1} + \beta(t)\omega^{2} \otimes \omega^{2} + \beta(t)\omega^{3} \otimes \omega^{3} + \delta(t)\omega^{4}\otimes\omega^{4},
$$
while satisfying the system of differential equations determined by $\frac{\partial g(t)}{\partial t} = -2Ric\left[g(t)\right]$.
The resulting system of differential equations is
\begin{align*}
\frac{d\alpha}{dt} &= 11\\
\frac{d\beta}{dt} &= 6\,{\frac {\beta\, \left( 24+17\,\sqrt {2} \right) }{ \left( 1+\sqrt 
{2} \right) ^{2} \left( 2+\sqrt {2} \right) ^{2}\alpha}}\\
\frac{d \beta}{dt} &= -6\,{\frac {\beta\, \left( 4+3\,\sqrt {2} \right) }{ \left( 2+\sqrt {2}
 \right) ^{2}\alpha}}\\
\frac{d\delta}{dt} &= -{\frac {\delta\, \left( 4+3\,\sqrt {2} \right) }{ \left( 1+\sqrt {2}
 \right)  \left( 2+\sqrt {2} \right) \alpha}},
\end{align*}
subject to the initial conditions determined by the metric $g$.  However, the system above is only satisfied if $\beta(t) = 0$ for all $t$, which can't happen if the initial metric $g$ is diagonal with respect to the indicated basis.
Up to a calculation error--it was triple checked--this counterexample should be enough to show that the Ricci flow does not preserve the diagonalization of the metric and the Ricci tensor (although it might circumvent some more delicate analysis issues by working with left-invariant metrics). I  hope that this is of some help.
</s>