The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Downloads index php instead of opening - can't login or access website (2 posts)

  1. asterbird
    Posted 2 years ago #

    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 installed

    If you don't have an .htaccess file, then it's probably another issue you have.

    Hope this helps someone, and have a great day!!!

  2. junaidkhawaja
    Posted 1 year ago #

    It worked for me ! Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic