Why does index.php get loaded 3 times?

[ad_1]

I am learning about WordPress and using PHPStorm to get a feel for things. I looked at the speed of loading and decided to set a breakpoint at ‘define( ‘WP\_USE\_THEMES’, true );’ in index.php. That’s when I noticed that loading the home page hits ‘define( ‘WP\_USE\_THEMES’, true );’ 3 times.

Why? I thought index.php was loaded only once.

[ad_2]
2 Comments
  1. Does your homepage load any JavaScript or images or anything else like that that maybe aren’t there? The index is the fallback position. When things don’t usually exist. Examine the home page, and see what loads in the sources tab of the inspector.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer