XF 1.1 Wordpress on the Same Directory

Cal

Well-known member
How can I install wordpress in the same directory as Xenforo?

I want to use the wordpress bridge that's on the site (I need to find it again, it's on this site somewhere) and xenforo is already installed in the main directory.

Can I rename Xenforo's index.php file to forum.php safely so Wordpress comes up as the primary site?

Anyone do anything like this before?
 
I recommend installing them in separate directories to avoid the conflict. Otherwise you can try modifying library/XenForo/Link.php. Search for and change "index.php" in that file. In the case of friendly URLs you also need to modify the .htaccess file. Untested, but those are the two instances of "index.php" that come to mind.
 
Hmm. Sounds a little more complicated. I need a CMS though and xenporta is entirely useless. I guess I'll try this. Thanks Jake.
 
Hey Jake, it worked but none of my wordpress posts show up now. They just lead to 404 errors on the forum rather going to the actual posts. So I think wordpress and Xenforo are conflicting with each other (sound right to you?).

How would I move Xenforo from the main directory to a sub directory. Something like /forums/

Nevermind. I figured it out. Works great!
 
I recommend installing them in separate directories to avoid the conflict. Otherwise you can try modifying library/XenForo/Link.php. Search for and change "index.php" in that file. In the case of friendly URLs you also need to modify the .htaccess file. Untested, but those are the two instances of "index.php" that come to mind.
Is this the only place that it has to change? Are there any other side effects on changing the index.php to something else?
 
Is this the only place that it has to change? Are there any other side effects on changing the index.php to something else?

Worked like a charm for me, although in the end it was just easier to change xen to a sub directory. All I did was use the same method though.
 
I recommend installing them in separate directories to avoid the conflict. Otherwise you can try modifying library/XenForo/Link.php. Search for and change "index.php" in that file. In the case of friendly URLs you also need to modify the .htaccess file. Untested, but those are the two instances of "index.php" that come to mind.
I couldn't get this to work. I changed to -

if ($skipPrepend)
{
$outputLink = $append;
}
else
{
$outputLink = 'xfindex.php' . $append;
}
}

and also have changed the name of xenforo's index file to xfindex.php. Do I need to change board URL?

Update: The problem is with the WordPress posts and the .htaccess. I now have wordpress created .htaccess. The xf has not yet created its htaccess and I'm wondering what should my htaccess have so that both wordpress pretty URLs and XF pretty URLs work fine?
 
Last edited:
@TheBigK

Can you provide some example WP friendly URLs? Can you also post WP's .htaccess file here?

Worst case, it should be possible to setup a hybrid .htaccess file with an explicit list of XF routes. But that combined with a renamed index file starts to become ugly.
 
Back
Top Bottom