Only-Home-Page Problem during WordPress Hosting or Migration

There are times when a WordPress site needs to be migrated to a new server or hosting. When 'everything' is set up, only the home page can be accessed as expected while all other pages return 404. Following the below method should solve the problem in most case.

Only-Home-Page Problem during WordPress Hosting or Migration

There are times when a WordPress site needs to be migrated to a new server or hosting. When 'everything' is set up, only the home page can be accessed as expected while all other pages return 404.

Following the below method should solve the problem in most case.

  1. Settings->Permalinks
  2. Select on of the Common Settings
  3. Save Changes

Enable Write Module (Apache2)

a2enmod rewrite
service apache2 restart

Allow Override (Apache2)

site.conf

<Directory /path/to/siteroot/>
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>