WordPress.org

Ready to get started?Download WordPress

Forums

wordpress is trying to open my index.php file (6 posts)

  1. rwilki
    Member
    Posted 1 year ago #

    I'm totally confused. Never seen this before in many many years. I went to work on my site and all of my browsers are trying to open the index.php file rather than loading my site. What can I do?

    WordPress 3.4.2

  2. Max
    Member
    Posted 1 year ago #

    Please explain what do you mean by opening your index.php, are you saying that you are seeing the actual PHP code, ie., you see:

    <?php
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     */
    
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define('WP_USE_THEMES', true);
    
    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
  3. rwilki
    Member
    Posted 1 year ago #

    Thanks Max. Not really, it's trying to download the index.php file rather than having it launch my website.

    I haven't touched the site recently and sucuri says it's fine. I had backupbuddy running on it, but I wouldn't think that would do anything either. I've never seen this before.

    I looked at the .htaccess file and it was missing the code in between:
    # BEGIN WordPress
    # END WordPress

    I added in the regular code that is supposed to go there, but it didn't help. It's on a windows server so not even sure if it's reading .htacess...

  4. Max
    Member
    Posted 1 year ago #

    Usually when you have a .php file downloading or the contents displaying it means that your PHP interpreter is not getting called, so the php handler is miss-configured.

    Since you are still talking about .htaccess, I assume you are running Apache on windows. Do you know if you are using mod_php or are you calling php as a CGI script with something like mod_fcgi?

  5. cdukes
    Member
    Posted 1 year ago #

    Are these sites all on the same server? If so, I'd bet the PHP interpreter is failing. This is a SERIOUS PROBLEM, since it means your wp-config.php file can be downloaded in plaintext. Contact your host immediately (and change all your credentials once it gets fixed).

  6. jtstuedle
    Member
    Posted 1 year ago #

    Have you tried a different computer?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.