Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your question is confusing. So you want another file that then includes the contents of <code>index.php</code> in WordPress? What are you trying to achieve? The basic gist of your question seems to be this line:</p> <blockquote> <p>Is a full, detailed index.php file absolutely necessary for it to function, or is it a one-time "load and go" php file that isn't referred to again once WP is in the browser?</p> </blockquote> <p>The way content management systems—or virtually any controller based system—works is to flitter all request in one file &amp; then act on them. In WordPress, that is <code>index.php</code>. And it does more than just load the homepage. It’s the gateway page to all other pages. So you can muck around with it, but why? And for what benefit?</p> <p><strong>EDIT:</strong> The original poster in the comments to my answer explains that they are thinking of ways to prevent a WordPress site from being hacked. Renaming a file will not work. Especially since <code>index.php</code> is only seen on the server side. Let’s say by some crazy config the original poster adjusts Apache to always load <code>fish.php</code> as their <code>index</code>. The web browser—and users &amp; bots—will still get WordPress content. Instead I do the following as a slid brute-force way of avoiding hacks: I place <code>.htaccess</code> password protection on the admin areas of CMS systems. The logic being—and it has worked so far—that most CMS systems are attacked by scripts that hack vulnerabilities in the admin or login process. Yes, some bots might get through. But you can eliminate tons of “low hanging fruit” with this method.</p> <p>For example, below is part of the Apache virtual host config that I will use as an example for a site I am calling <code>mygreatsite.com</code> that I have based in the standard <code>/var/www</code>. Note that I am adding authorization for <code>wp-login.php</code> and <code>wp-admin</code> but allowing <code>admin-ajax.php</code> to pass since many functions use it. Now users who administer the site will need to remember an additional—somewhat generic—<code>htpasswd_wordpress_admin</code> user/password combination on top of their standard WordPress credentials. But guess what? Most CMS hacking scripts give up when faced with a browser based password coming from Apache like this.</p> <pre><code> # Added for WordPress CMS protection. &lt;Directory /var/www/mygreatstite.com/wordpress/wp-login.php&gt; Options FollowSymLinks AllowOverride all AuthName "WordPress Login" AuthType Basic require valid-user AuthUserFile /etc/apache2/htpasswd_wordpress_admin Order Deny,Allow Deny from all Satisfy Any &lt;/Directory&gt; # Added for WordPress CMS protection. &lt;Directory /var/www/mygreatstite.com/wordpress/wp-admin&gt; Options FollowSymLinks AllowOverride all AuthName "WordPress Admin" AuthType Basic require valid-user AuthUserFile /etc/apache2/htpasswd_cms_admin Order Deny,Allow Deny from all # Allow 'admin-ajax.php' to pass. &lt;Files admin-ajax.php&gt; # Order Allow,Deny Allow from all &lt;/Files&gt; Satisfy Any &lt;/Directory&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload