Welcome to WebmasterWorld Guest from 107.20.122.81

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?

     

mircea1st

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

5+ Year Member



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 :

<?php
/**
* 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 */
require('./wp-blog-header.php');
?>




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 !

varindia

6:39 am on Aug 4, 2012 (gmt 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.

phranque

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



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.

imbIMBimb

6:39 pm on Sep 21, 2012 (gmt 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.

not2easy

9:48 pm on Sep 21, 2012 (gmt 0)

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month



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.

SeanIM

11:50 pm on Sep 24, 2012 (gmt 0)

10+ Year Member



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.

Dether

9:06 am on May 7, 2013 (gmt 0)



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

Featured Threads

Hot Threads This Week

Hot Threads This Month