Not sure how to proceed with moving WordPress installation between hosts

After reading, Primary script unknown I decided to try and run the old host’s config on the new host using the same caddy version (1.0.4), which pointed to the error described in that link. So I have now tried to edit the PHP-FPM configuration to allow Caddy to run with its own unix socket. Including setting up caddy to use its own socket, making sure that the socket is run under that users name, etc. That did not work, 404. Then I tried changing the user under which caddy runs when using systemctl start caddy to be www-data, which also did not work - again a 404. So I am at a loss now.
This leads to several questions, why can’t I run the same caddy version with the same config as the old host on the new host? Why won’t this setup run on the new host with its own unix socket/etc?
Is there anything else I can do to try and get it to work?