• Resolved light98889

    (@light98889)


    I need to manually edit the main page to my site but all the index.php’s and index.html files I look in don’t show the code for the home page. I’m guessing wordfence has something to do with this. What do I need to do to get direct access again to edit the main page. How I can figure out what directory the main page is even in? I’m assuming it’s supposed to be /public_html no?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi

    I am assuming that you are new to WordPress. Welcome to the world of dynamic publishing! That means the page is generated or built by PHP when it is requested. The index.php file you saw probably had this or some similar code in it, right?

    <?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 __DIR__ . '/wp-blog-header.php';

    That’s part of what WordPress calls to build your page. What you want to do is look in the admin area of your site for pages or similar and try to find out what it calls up for the home page. Then you edit it there. Wordfence isn’t what is causing this. This is how WordPress works.

    Tim

    Thread Starter light98889

    (@light98889)

    yes that is what I’m seeing now but the thing is I know I was able to edit it in the past. If I look at the source code when the page is pulled up in the browser I can even see my edits. WordPress is broken in that I can’t modify the page through the WP admin console so thats why I was editing the file manually before and need to again now. I’ve tried searching for some of the text I’m seeing in the source code through all the files on the server and none are appearing.

    I’ve never seen the code in the main index.php file be anything other than that. Good luck and let us know what you discover.

    Tim

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t access index.php’ is closed to new replies.