Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Can I run both wordpress website and non-wordpress on same domain ?

what do i do with the Index.php file?

12:53 pm on May 1, 2012 (gmt 0)

New User

5+ Year Member

joined:Jan 13, 2010
posts: 15
votes: 0

So , Can I run both wordpress website and non-wordpress website on same domain ? There are no file conflicts from the 2 scripts ,so they both go fine on same domain. My main problem is with the index file: i will keep the non-wordpress index.php file ,and have to do something with the wordpress index.php file ...

Where do i put index.php from wordpress,in order for it to work ? Other script works perfect because it has it's index.php file .

Here is the index.php wordpress content file :

* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
* @package WordPress

* Tells WordPress to load the WordPress theme and output it.
* @var bool
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */

There will be no permalinks duplicates. And i could use other domain/subdomain ,but i need the non-wordpress as a home , an wordpress to create extra pages with slideshows for clients . So i need the main domain ...for both.

Thank you !
6:39 am on Aug 4, 2012 (gmt 0)

New User

joined:Aug 4, 2012
votes: 0

Just think of the URL or page where you want your wordpress to appear, install(WP) there. If you keep both in home dir, then redirect index.php of wp through htaccess. Every kind of design can be done in wordpress if you have proficiency in the same. My suggestion is that keep one (either wp or code) and if you keep code in home dir, keep wp in some sub dir. The best option is do the whole thing in wp which good for SEO.
1:25 pm on Aug 4, 2012 (gmt 0)


WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
votes: 10

as long as there is no conflict between the set of wordpress urls and the non-wordpress urls then you should be able to rewrite to the correct script.
this is typically accomplished by installing wordpress in a subdirectory or subdomain of the non-wordpress site.
6:39 pm on Sept 21, 2012 (gmt 0)

New User

joined:Sept 21, 2012
votes: 0

But do not forget to create a second sitemap.xml. I have created a few static pages with a separate sitemap.xml, while Wordpress generates its own on subdirectory. You should then specify the path to your both sitemaps in robots.txt file.
9:48 pm on Sept 21, 2012 (gmt 0)

Moderator from US 

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
votes: 57

On one domain I have WP installed in a subdirectory but served as the homepage for the domain, the rest of the site has it's own structure that is tied into WP. That means that you can navigate the entire site from anywhere in it and lets me keep the nice things that don't work well with WP. There were some stumbles getting everything right but it is easier to do things different ways with this setup. One tip: make sure all your urls for navigation and resources are absolute.
11:50 pm on Sept 24, 2012 (gmt 0)

New User

10+ Year Member

joined:July 9, 2005
votes: 0

I've had to do this before for a client (and myself) who dug how the old index page was working so just installed WP on a subdir and ran the blog from that. Otherwise just run the whole thing from WP if possible...it's easier imo.
9:06 am on May 7, 2013 (gmt 0)

New User

joined:May 6, 2013
votes: 0

Put wordpress files into a new directory name it like blog or something when u will have :
www.something.com/blog/something .