Downloads index php instead of opening – can't login or access website
-
Hello, when I try to access my website homepage or login, it tries to download the page instead of opening like normal.
I’m posting here in case anyone else has this issue – hopefully it will save them the 2 hours it took me to fix this!
I worked fine on my website all day yesterday, but this morning it tried to download the index php instead of opening it like a browser normally does. I could still get into cPanel. I tried:
- Renaming my theme to old-[name-of-theme]
- Renaming plugin folder to old-plugins (to disable them all)
- Clearing the cache for Firefox, Safari, and Chrome.
Nothing worked.
Here’s what did work: delete
AddHandler application/x-httpd-php52 .php .php5 .php4 .php3
from .htaccess file. No idea how that got there!I also found comment #5 on this post helpful: http://forums.hostgator.com/wordpress-index-php-downloads-instead-opening-t76354.html
To open .htaccess in cPanel:
Click File Manager and make sure to tick Show Hidden Files (dotfiles) before clicking Go. The .htaccess should show up where wp (wp-admin, wp-content, wp-includes) is installedIf you don’t have an .htaccess file, then it’s probably another issue you have.
Hope this helps someone, and have a great day!!!
- The topic ‘Downloads index php instead of opening – can't login or access website’ is closed to new replies.