How do I edit/view a Wordpress blog installed in the same folder as an HTML site?

I’m replacing a regular HTML site with a Wordpress blog site. I want to keep the HTML site up while I create the Wordpress blog site, and since the Wordpress blog site will replace the HTML site, it is installed in the main folder (public_html) of the site where the HTML site also resides. The homepage of the html site is index.html.

So I tried going to, but for some reason, it forwards to the other domain that it USED to forward to before I replaced the index.html file with the homepage of the HTML site. Very weird.

Then I tried going into the admin section of the blog and “previewing” a blog post, but that also just forwarded to the domain that it used to forward to. The way it was forwarded was a simple redirection script that was in the header of a blank web page. But that’s no longer there.

In any case, how do I set it up so that I can work on and view the blog while the HTML site is still up and located in the same folder as the Wordpress install?


As long as your static site is all in html, Wordpress shouldn’t affect it. To work on your WP site you need to go to That should come up with a login screen that will lead you to your WP administration.

You should probably also bookmark the WordPress codex, which holds a great deal of the documentation that will help you with future WordPress problems.

I actually did that. I was able to be in the backend and create posts & pages, but I was not able to preview them or view them after they were created. However, things have changed since my original post. Now, it no longer forwards to the other domain. But, when I try to view it, I just get sent to the homepage, no matter what I try to view on the blog (post or a page). It seems as though the index.html file takes precedence, which is weird, because I am not trying to view another “homepage.” I’m trying to view another page on the site. Suggestions?

Thanks for the link.

This might work for me. I was advised to install it into a sub-folder, and then when I’m done, do this to make it the main site:

Giving WordPress Its Own Directory « WordPress Codex

It did work. I tested it on a new site. However, I did not test it on the site in question, because the instructions are for how to make it live in the root folder while having the Wordpress files in a sub-folder.

What I would like to do is move the blog to a sub-folder and have it be live and be powered in the sub-folder, meaning you would go to to see the blog instead of Then, later, after I finish designing the blog, I’d like to change the files/settings so that it is powered in the root directory (would go to to see the blog) while all of its files remain in the sub-folder (except for the few files that you have to move/copy to make the change).

Here are my questions before I make the move:

Can I just move the files over to a new directory like that doc (see the link I posted in my post right above this one) suggests and work on it there? I just wouldn’t copy the index.php file back to the root folder nor would I make any changes to it. By doing that, I’d be keeping it powered in the sub-folder (go to to see the blog), right? And if I do move it like the doc says (vs doing a fresh install in another folder), is that going to screw up the link to the database, or is the database path a full path in the coding?

If I need to do a fresh install into a new folder, that’s fine, but I would prefer to keep this installation, as I have already created some pages.


Your problem maybe due to the order in which the names of the accepatable home page are listed.

Every web server has a list of acceptable names for home pages: index.htm, index.html, index.asp… etc

Sometimes is a comma separated value list, like in Apache, sometimes every name has to go in a new line, like in IIS

This saves you from having to write the whole address when you go to a site, and you can safely write the domain IANA — Example domains because the home page will load (that is, if there is any page with one of those names).

So what happen if you have a file named “index.html” and another named “index.php”?

Well, if index.html appears first on the list, it will be the one to show on the screen. If index.php was the one listed first, it will the winner.

What if you want your home page to be named “whatapage.php”? Well, if you don’t want people to type the whole thing (that is, [I]http://www.domain.ext/whatapage.php[/I]), you will have to add that name, whatapage.php, to the list. But make sure that you place it in the right order, else, you will find that if there is an index.html, it may show first :wink:

That’s what happens when you want to preview your post before publishing. WP directs to the folder (your domain, because you hosted it under the root) but it links to the folder, not to the file, it is not supposed to be necessary if there’s no other file to compete to be the homepage. But you do have one, your index.html file which is first on the list, so that’s what it shows.

I would suggest that you move the whole WP to a subfolder while your testing your site. You don’t have to do anything else, you will have your old site visible while you will be able to test WP beautifully (the address for WP will be, and for the admint

Unless you changed the .htaccess file, of course.

I hope that this is clear and that it wasn’t too long :slight_smile:

You don’t need to do a fresh install, simply move the files into a new folder. It will not affect the looks or the content. The content is saved on the database and couldn’t care less where you files are, but if you move everything to a subfolder, keeping the folder structure, the looks will be the same too.

Edit: and you will be able to preview your posts before you publish them, because WP calls to the folder where it is installed

I’ve done this recently, having a live HTML site and a WP site being constructed under a sub-directory. As molona says, WP doesn’t care where it is - because content is in the database.

In the General Options (under Settings) in wp-admin you can find two URL, “WordPress address (URL)” and “Site Address (URL)” - you may wish to alter these before moving your WordPress root files to their new directory (so going from to the former being your old sub-folder and the latter being the new location.

Setting up WordPress in the same directory as an HTML site is sloppy in any event.
The advice you got to segregate it in its own directory is a good idea.