Configuring Home Page Address

If there is no clear evidence of any present redirect from the following sources:

  1. The htaccess, both under the public_html and under the public_html/folder (where folder is the directory having all the wp files), removing and regenerating them by mean of updating the permalinks,
  2. The .htaccess files were at some point deleted, and regenerated,
  3. The domain server, removing all possible redirects,
  4. The index.php files, which redirects calls where there are no files to serve,
  5. The Static Page is correctly configurated,

The options you have are:

  1. To Create a dumb home page index.php,home.php or any similar flavoured choice, on the public_html folder,
  2. To seek for a plugin able to do that (Of course i skipped these step, in order not to increase even more the huge amount of manhours for solving this issue),
  3. To migrate/reinstall everything on the public-html folder.

The last choice, is by far the simpler and straighter.

By default, a fresh installation of WP leaves everything well configured on the www.example.com folder. IF you install on a wp or a folder, you lost the pretty address, and risk a little uglier canonical url (www.example.com/home).

Check here, https://codex.wordpress.org/Moving_WordPress-, in particular, the section “If You Have Accidentally Changed your WordPress Site URL” which shows two ‘hack’ lines to reenter the modified folder.

Thus, when WP install to the same ‘public_html’, the Canonical URL can then preserved to www.example.com, and no duplicity is found.

For clarity the steps are:

  • Rename folder to newfolder, where folder is the directory for the WP installation,
  • Edit the index.php and .htaccess and change ‘folder’ with ‘newfolder’, if required,
  • Add the two lines on wp-login.php (see the above guide!):

    update_option('siteurl', 'http://www.example.com/newfolder' );
    update_option('home', 'http://www.example.com/newfolder' );

  • Open http://www.example.com/newfolder/wp-admin. The update should be ready now.

And that’s all. The migrated WP installation now starts directly at www.example.com after the proper configuration of the Static Page.