Support » Installing WordPress » WordPress displaying folder listing instead of index page

  • Resolved WebsterInk

    (@websterink)


    Hi,

    This is my first use of WordPress & first post here, so any assistance greatly appreciated.

    I installed 3.1 from scratch as a sub-folder on my local test server without any problems. However, when accessing the page from my browser (Firefox or IE) i.e. http://localhost/wordpress/, the folder contents are displayed rather than the index.php page. Clicking on index.php produces the same result.

    It took a short while to locate the Control Panel, but from what I can tell, everything seems to be in order. It indicates I have some sample content, I just can’t view it. Clicking on View Post or View Page brings up the same root folder listing, so I presume the problem is with index.php.

    Initially I thought I had a problem as I couldn’t see a Visit Site button, but discovered that this is standard with current release, just not mentioned @ codex.wordpress.org/First_Steps_With_WordPress.

    If I try loading any of the required files in index.php, or wp-blog-header.php an empty HTML file is displayed, i.e.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
    <BODY></BODY></HTML>

    From looking at the source of these files, I noticed that a few items are commented out:

    e.g.index.php

    <?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');
    ?>

    Should the package & bool references be uncommented for it to work?

    Searching the forum gave me a few things to look at, but no definitive answers.

    Current configuration:
    Apache: 2.2.11 (Win32)
    PHP: 5.2.9
    MYSQL: 5.1.30 Community

    Any assistance would be greatly appreciated.

    Webster

Viewing 2 replies - 1 through 2 (of 2 total)
  • Erik

    (@southernutahautism)

    If you’re seeing the directory contents instead of the actual pages, it probably means that your apache/php is not running or running properly for localhost.

    I use MAMP on OS X, so I can’t really offer any advice for a windows setup.

    I was about to post back when I discovered what the problem was. My httpd.conf looked like this

    <IfModule dir_module>
        DirectoryIndex index.html
    </IfModule>

    instead of this:

    <IfModule dir_module>
        DirectoryIndex index.php index.html
    </IfModule>

    Updating it resolved the issue.

    I suppose talking about the problem helped me find the solution.

    Thanks anyway.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress displaying folder listing instead of index page’ is closed to new replies.