Under certain circumstances it can happen that WordPress is only showing the Homepage after the migrations to a new server. In such cases, check your Apache configuration and make sure that the
Override option is set to
All for your hosting directory. Here’s an example:
<Directory /var/www/wordpress> Options Indexes FollowSymLinks Allow from all Require all granted AllowOverride All </Directory>
If you just set up a new server, you may need to enable the Apache
mod_rewrite module too.