A problem in loading index.php

WordPress is doing exactly what you’re telling it to do, based on the Template Hierarchy and your Reading Settings.

The first thing to understand is that WordPress uses index.php as the default fallback template file for all contexts, and not as the site front page template.

The second thing to understand is that the template file WordPress uses to display the site front page depends on your Reading Settings:

  • If the current Theme includes a front-page.php template file, WordPress will use it, regardless of Reading Settings. Otherwise:
  • If your front page is set to display a static page, then WordPress uses the Page Hierarchy to display the site front page:
    • _wp_page_template (custom page template)
    • page-{slug}.php
    • page-{id}.php
    • page.php
    • index.php
  • If your front page is set to display the blog posts index, then WordPress uses the Home Page Hierarchy to display the site front page:
    • home.php
    • index.php

The third thing to understand is that, regardless of template file used, if your Reading Settings are set to display the blog posts index on the site front page, then the default query on the site front page will be the default blog posts query; but if your Reading Settings are set to display a static page on the site front page, then the default query will be for the static page assigned to the front page. That means that, even if you have the front page set to display a static page, and the Page Hierarchy falls back to index.php, then index.php is still only going to display a loop of one post: the static page assigned to the front page.