Title: Can&#8217;t access index.php
Last modified: May 20, 2021

---

# Can’t access index.php

 *  Resolved [light98889](https://wordpress.org/support/users/light98889/)
 * (@light98889)
 * [5 years ago](https://wordpress.org/support/topic/cant-access-index-php/)
 * 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)

 *  [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * (@wfsupport)
 * [5 years ago](https://wordpress.org/support/topic/cant-access-index-php/#post-14466077)
 * 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. Word**fence** isn’t
   what is causing this. This is how Word**Press** works.
 * Tim
 *  Thread Starter [light98889](https://wordpress.org/support/users/light98889/)
 * (@light98889)
 * [5 years ago](https://wordpress.org/support/topic/cant-access-index-php/#post-14468006)
 * 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.
 *  [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * (@wfsupport)
 * [5 years ago](https://wordpress.org/support/topic/cant-access-index-php/#post-14468801)
 * 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.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

## Tags

 * [index.php](https://wordpress.org/support/topic-tag/index-php/)

 * 3 replies
 * 2 participants
 * Last reply from: [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/cant-access-index-php/#post-14468801)
 * Status: resolved