  The crystal lattice of Sr$_2$IrO$_4$ is investigated with synchrotron X-ray
powder diffraction under hydrostatic pressures up to $P=43$ GPa and
temperatures down to $20$ K. The tetragonal unit cell is maintained over the
whole investigated pressure range, within our resolution and sensitivity. The
$c$-axis compressibility $\kappa_c(P,T) \equiv -({1} / {c}) ({d c} / {d P})$
presents an anomaly with pressure at $P_1=17$ GPa at fixed $T=20$ K that is not
observed at $T=300$ K, whereas $\kappa_a(P,T)$ is nearly
temperature-independent and shows a linear behavior with $P$. The anomaly in
$\kappa_c(P,T)$ is associated with the onset of long-range magnetic order, as
evidenced by an analysis of the temperature-dependence of the lattice
parameters at fixed $P=13.7 \pm 0.5$ GPa. At fixed $T=20$ K, the tetragonal
elongation $c/a(P,T)$ shows a gradual increment with pressure and a depletion
above $P_2=30$ GPa that indicates an orbital transition and possibly marks the
collapse of the $J_{eff}=1/2$ spin-orbit-entangled state. Our results support
pressure-induced phase transitions or crossovers between electronic ground
states that are sensed, and therefore can be probed, by the crystal lattice at
low temperatures in this prototype spin-orbit Mott insulator.
