Templated electrochemical growth in nanoporous alumina can be used to fabricate nanowires with applications in magnetic storage devices, hydrogen sensors, and electrocatalysis. It is known that nanowires, grown in such templates, are strained. The strain in nanoscale materials can influence their performance in applications such as catalysts and electronic devices. However, it is not well established how the nanoporous template affects the lattice strain in the nanowires and how this develops during the growth process due to the lack of non-destructive in situ studies with spatial resolution. Here we have measured the strain and grain size of palladium nanowires in nanoporous templates during the growth process. For this we performed in situ scanning x-ray diffraction with a submicron focused x-ray beam. We found that there is a tensile strain in the nanowires and that it is more pronounced along the growth direction than in the confined direction of the templates. The tensile strain measured in situ is higher than previous ex situ reports, possibly due to hydrogen absorption during the growth. With the spatial information made possible with the focused synchrotron x-ray beam we could observe local variations in strain as a function of height. A region of local strain variation is found near the bottom of the nanowires where growth is initiated in branches at the pore bottoms. Knowledge of how nanoporous templates influence the strain of the nanowires may allow for atomic scale tailoring of the catalytic activity of such nanowires or minimizing strain to optimize electronic device performance.