I’m trying to do what lots of others do – by developing a new wp main site and then moving it/redirecting it/renaming it so that it becomes the new fully-fledged site: in much the same way as Aedryan Methyus discussed in his thread ‘Installing WordPress In Root With Existing HTML Site?’.
I’ve read heaps of the codex and forum posts about it, and as my new site will have lots of contents/image links etc I’m not 100% certain of my skills to ensure that I’ll put in ‘relative’ links in absolutely everything (as was a excellent solution by New Nine.
However, something that was said in this thread about using the htaccess file gave me an idea, and I’d just like to check out what more experienced coders thought about this solution…
My current ‘old’ site is all .htm/.html pages, except for a newer contact.php page.
And I believe that ALL wordpress posts and pages are .php files (??)
So this is what I’ve trialed:
1. Old site runs as normal +
2. New install of w/press in Root of my site:
So all new wordpress site will have the correct final url’s, with no extra subdirectories so the urls look clean, and with no need to change any urls later.
BUT the main problem is I can’t access my new home page for design and review (and I can’t do this on my local test server because 1 really important plugins can’t be loaded onto a localhost).
3. I added in a line of code into my main .htaccess file in my site root (via the editor on my cPanel), namely:
DirectoryIndex index.php index.html index.htm
to bring up my wordpress home.php page first so that I can review it, rather than the default .html page.
Well, it certainly seemed to work, and obviously I can only do this for quick reviews before removing the code again from the .htaccess file. Also I think that’s possibly all I then have to do when I want to change from my old site to my new one??
Does this sound reasonably OK, code wise? I’d really appreciate feedback on this, as I’m happier using css and html and don’t really understand the other file types – just do what others suggest!
Also if it is an OK ‘fix’, then it’s really super easy for anyone that has access to their cPanel, and might be a useful option for others, like myself.
Looking forward to any comments. Thanks.
- The topic ‘temporary edit of .htaccess for root install of new wp site – feedback please!’ is closed to new replies.