You might happen to be in a situation when your homepage displays index.php code instead of your frontpage, and here is one of the solutions for it.
The message displayed:

---
Solution:
Please go to your Document Root folder (folder where your files are, for example, wp-config.php) and locate .htaccess file.
Check if it has PHP version defined in it. If not, please add these lines on the very top of your htaccess file:
#+PHPVersion#="php74"AddHandler x-httpd-php74 .php#-PHPVersion
And, Save.
Voila, your website should be running.
Best wishes,
Helmuts