Physics‐informed neural networks (PINNs) provide a new class of mesh‐free methods for solving differential equations. However, due to their long training times, PINNs are currently not as competitive as established numerical methods. A promising approach to bridge this gap is transfer learning (TL), that is, reusing the weights and biases of readily trained neural network models to accelerate model training for new learning tasks. This work applies TL to improve the performance of PINNs in the context of magnetostatic field simulation, in particular to resolve boundary value problems with geometrical variations of the computational domain. The suggested TL workflow consists of three steps. (a) A numerical solution based on the finite element method (FEM). (b) A neural network that approximates the FEM solution using standard supervised learning. (c) A PINN initialized with the weights and biases of the pre‐trained neural network and further trained using the deep Ritz method. The FEM solution and its neural network‐based approximation refer to an computational domain of fixed geometry, while the PINN is trained for a geometrical variation of the domain. The TL workflow is first applied to Poisson's equation on different 2D domains and then to a 2D quadrupole magnet model. Comparisons against randomly initialized PINNs reveal that the performance of TL is ultimately dependent on the type of geometry variation considered, leading to significantly improved convergence rates and training times for some variations, but also to no improvement or even to performance deterioration in other cases.