We report a study on the pressure response of the anisotropy energy of hollow and solid maghemite nanoparticles. The differences between the maghemite samples are understood in terms of size, magnetic anisotropy and shape of the particles. In particular, the differences between hollow and solid samples are due to the different shape of the nanoparticles and by comparing both pressure responses it is possible to conclude that the shell has a larger pressure response when compared to the core.