Hmmm With my current setup I do not believe I even have any sort of lamp setup.
By components, I know how to transfer everything there but the php code. I am bit confused on that. Do you mean everything from the Nextcloud installation folder relating to php?