index.php is always displayed before any file on the URL

First, check if you have an .htaccess file with the following:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

If this file already exists with the appropriate rules, try the following:

  • Go to your site Settings > Permalinks. If there is something already there, make sure you copy it and keep it safe in case it breaks your site. Select one of the defaults and save.
  • Visit your site and refresh.
  • If you still have no solution, try a hard refresh on your site – cmd/ctrl + shift + r.

If you are still having the problem, please go into more detail about the circumstances of your site (version, plugins, theme, etc.) so we can try to better help you.