WordPress.org

Ready to get started?Download WordPress

Forums

keep index.html live while WP is installed on root (12 posts)

  1. malibu06
    Member
    Posted 4 years ago #

    I'm trying to keep my old HTML site live while I develop a new WP site on the same domain.

    I installed WP on my godaddy hosting account this morning thinking that the current html site would remain live while I develop the WP site in the same directory. I've had this work on other hosts, but apparently godaddy's priority is:
    1. index.php
    2. index.html

    I came across this thread http://wordpress.org/support/topic/232763?replies=16#post-1333760 which explains how to disable the canonical URL redirect, and followed the steps exactly, but no luck.

    anyway to keep both sites live?
    i've also tried rewriting htaccess as below, but no luck there either

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.html [L]
    </IfModule>
  2. jonradio
    Member
    Posted 4 years ago #

    I have done this before (keep an old site alive while developing WordPress) and had much more success with this approach:
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    Based on that experience, I now strongly believe that it never makes sense to install all the WordPress files in the root, but always to give WordPress its own folder while still running WordPress from the root.

    This approach should allow you to develop in the subfolder, stage the necessary WordPress files (described in the article), except index.php, which you could stage as tindex.php. Then do a quick rename to go live, and also rename the index.html file just to be safe.

  3. malibu06
    Member
    Posted 4 years ago #

    thanks adiant,

    in this example would I change the General / Settings to point to http://example.com/wordpress for both the WordPress address AND the Blog address until I was ready to go live?

  4. jonradio
    Member
    Posted 4 years ago #

    Yes, exactly!

  5. Kailash
    Member
    Posted 4 years ago #

    You can simply change the priority on default page using DirectoryIndex tag. Just add following in your .htaccess:

    DirectoryIndex index.html index.php

  6. hsawires
    Member
    Posted 4 years ago #

    one more question please adiant
    How could i keep my both index.html and index.php on the same root while i update my WP site ? because every time i wnat to check my WP site on the following URL http://www.mysite.com/index.php/ it redirect it self to the http://www.mysite.com/index.html.
    the question is:
    how could i check my WP site online while i keep the old HTML alive? - i can not see what i have done online.

  7. Saildude
    Member
    Posted 4 years ago #

    You can't have both index.html and index.php in the same directory.

  8. hsawires
    Member
    Posted 4 years ago #

    @ Saildude
    yes i can have both index.html and index.php in the root of my website directory.
    but the problem is in the priorities.
    .html take the first priority while .php redirect itself to the .html -- that's mean i can test my WP site while the old one is alive and still working.

    i have made some test and i have a conclusion.

    • you can rename index.html to home.html for example and that will let .php take the priority.
    • or, you can put your new WP site in a subfolder and whenever you finish testing and uploading real data, move your index.php to the root and remove your old html's. following the steps Giving_WordPress_Its_Own_Directory
  9. Saildude
    Member
    Posted 4 years ago #

    Simpler to just put WordPress in it's own directory then move it - or at least that is what I normally do. Was just indicating that having index.html & index.php in the same directory is a problem - about every 3rd day someone comes here with that problem.

  10. thedark
    Member
    Posted 4 years ago #

    You can use a maintenance plugin. You can customize that page.

  11. ignaciosagone
    Member
    Posted 4 years ago #

    i had this problem before.

    The solution i found is this

    http://www.example.com/index.html this is your old website's index

    if you installed wordpress and you want to see the updates on the road:

    1. in the wp admin go to permalinks and set the COMMON SETTINGS to Day and name
    2. go to http://www.example.com/index.php/index.php
    3. you should see your wp
    4. you can password-protect your theme directory
    5. thats all!

    note: your host provider should have the following file herarchy:

    1. html, htm
    2. php, asp, aspx etc

  12. koroshiya
    Member
    Posted 3 years ago #

    I had the same problem. The easier solution I found was to set wordpress to use a static page for the home (http://codex.wordpress.org/Creating_a_Static_Front_Page), and create a special template with just HTML code for that page.

    Since my homepage is going to be a static page anyway, I can just type mysite.com/myHomepageName to access it (instead of mysite.com which points to the html holding page).

Topic Closed

This topic has been closed to new replies.

About this Topic