Porting site URLs to new host but with same domain name [closed]

This is probably because .htaccess is not being respected.

If you’re using Apache as a webserver, make sure that mod rewrite is active and .htaccess files are read and used in vhosts. You should allow overrides in the vhost. Like this:

<Directory /var/www/site/example.com/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

If you are on Nginx, it will do nothing with .htaccess and you have to create rules in the server block to make sure rewrites (pretty url’s) work. Like this:

location / {
    try_files $uri $uri/ /index.php?$args;
}