• Hi,

    I am having a very strange problem occuring with my wordpress site (www.norfolkutility.com). I have built my own custom theme named Norfolk where I have both an index.php and home.php file. Obviously the home.php file is what I want to be brought up when users type in the url of my site and for a while it was working fine. However, recently when I went to my site to take a look at it I got a strange page that was not either home.php or my index.php files in the root of the theme folder. Upon searching for this mysterious file I found it at the root of the wordpress site itself at the same level as wp-content, wp-includes etc. It was an index.php file which I had never created or wanted. I deleted it and everything was fine (my home.php file was now back to being brought up when users typed in the url). A few days later I went to the site again and the file was right back where I had previously deleted it. Anyone have a clue as to what is going on????????????

Viewing 5 replies - 1 through 5 (of 5 total)
  • What doe sthe file look like?

    WordPress has, and requires, an index.php file at the root of the site

    The entirety of the content is below. However, a WP would not function without it…. which makes your situation quite peculiar

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

    Thread Starter bmoore2

    (@bmoore2)

    I apologize it is actually an html file -> index.html -> I deleted and then restored it to take a look at its properties and contents.
    It says it is being created in the early morning when I certainly was not working on it then. I am going to check to see if it is something scheduled with my backups or something else related. But any other info you can give me would be helpful thank you.
    Contents:

    <html>
    <head>
    <title>Norfolk Utility Truck Service</title>
    </head>
    <body>
    <center>
    Thank you for visiting Norfolk Utility Truck Service.
    </center>
    </body>
    </html>

    Yup, I have no idea where something like that would come from!

    Is your hosting service somehow auto-generating placeholder files for you?

    Thread Starter bmoore2

    (@bmoore2)

    Well I believe I know what the problem was. I was on the right track with checking my backups. My backups were set to sychronization for this directory, so it was copying back any files in the destination back to the source, even if I deleted it from the source.

    Yup, that would definitely be a problem!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘index.php automatically being generated?????’ is closed to new replies.