WordPress Page Not Found if Permalink Settings is Postname

On the staging server, in your wp-config.php

define( 'WP_SITEURL', 'http://SERVER_IP/projectname' );
define( 'WP_HOME',    WP_SITEURL                     );

Then:

  • Place an empty .htaccess in /projectname
  • Load http://SERVER_IP/projectname/wp-admin/options-permalink.php
  • Check .htaccess – have rewrite rules been added?