1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Wordpress on the Same Directory

Discussion in 'XenForo Questions and Support' started by Cal, Dec 8, 2012.

  1. Cal

    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?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.
  3. Cal

    Cal Well-Known Member

    Hmm. Sounds a little more complicated. I need a CMS though and xenporta is entirely useless. I guess I'll try this. Thanks Jake.
  4. Cal

    Cal Well-Known Member

    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!
  5. DBA

    DBA Well-Known Member

    Is this the only place that it has to change? Are there any other side effects on changing the index.php to something else?
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yes, off the top of my head.

    Only that the new file name might not be a default directory index.
    DBA likes this.
  7. Cal

    Cal Well-Known Member

    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.
  8. TheBigK

    TheBigK Well-Known Member

    I couldn't get this to work. I changed to -

    if ($skipPrepend)
    $outputLink = $append;
    $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: Nov 30, 2015
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


    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.

Share This Page