3 replies
Good morning guys and gals,

Kind of a technical question for such an early time but its on my mind.
When uploading a html file to a web domain via FTP client. If I want the file to be the "main" page of my site.. it has to titled "index" right?

So with that said.. what do I do if my site already has a current "index" file?
But lets say, I want a sales letter as my index.

Must I delete the current index file? and just replace it.. I am kinda worried it would mess up WordPress or a current theme so I haven't yet tried it.
#html #index #page
  • Profile picture of the author Istvan Horvath
    OK, you are asking more than one question there...

    Yes, usually, the file that is supposed to show up by default in a directory (root directory like example.com or in a subdir like example.com/whatever/ ) should be name - NOT titled! - index.

    Host, normally, would define the order for index files with different extensions to show up; e.g.
    1. index.html
    2. index.php
    3. index.htm
    4. index.shtml
    etc...

    And no, normally you should not have more than one index file in a directory! Even with the order established by the host... you may run into issues when using different script that refer to their INDEX file without extension in the internal code: the script commands and the server commands will interfere.

    Finally, with WP definitely do NOT try to have 2 index files in the root directory. You either have WP at your root directory or another index file. Cannot have both.
    Furthermore: you can NOT re-name and/or delete the index.php file(s) where WP is installed.
    > have a subdir (exameple.com/a/ - and put your index.html file into the /a/ directory!
    Signature

    {{ DiscussionBoard.errors[7899335].message }}
    • Profile picture of the author thecableguy
      Wordpress is an php file. The index file is just the default file for the folder. In other words if no specific file is selected it will default to the index file. You're uploading an HTML file, it will use the HTML as the default first before looking for the php file. Since they are different file types it will not overwrite the php file. The HTML file will not function with Wordpress unless you link some of the pages. And no it will not mess up Wordpress, but what you'll have is an HTML page that's not linked to anything unless you link it. And yes it will WP will work with an HTML homepage. You can put HTML pages in the same folder as php files. If you're going to use an HTML homepage don't delete the index.php or you'll have trouble.
      {{ DiscussionBoard.errors[7899362].message }}
      • Profile picture of the author Stephen Williams
        Thanks very much! That has cleared a lot up for me. And also I learned something.

        Cheers guys.
        Signature
        Right To The Point

        {{ DiscussionBoard.errors[7899472].message }}

Trending Topics