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

Moving XF to different directory results in error.

Discussion in 'XenForo Questions and Support' started by -GR-, Dec 3, 2010.

  1. -GR-

    -GR- Well-Known Member

    I decided I wanted to put wordpress in the root of the domain and move XenForo to the community directory. I updated the board url in the admin options before moving all of the files to the community folder. However I am getting the following error:

    Warning: require(/home/opt/public_html/library/XenForo/Autoloader.php) [function.require]: failed to open stream: No such file or directory in /home/opt/public_html/index.php on line 8

    Fatal error: require() [function.require]: Failed opening required '/home/opt/public_html/library/XenForo/Autoloader.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/opt/public_html/index.php on line 8
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That error is being generated from index.php inside public_html, not from your community directory. Make sure you removed the xenForo files from the old location.

    Is your forum working at the new location?
  3. -GR-

    -GR- Well-Known Member

    I have it working now but it wasn't working even with all of the old files removed. I ended up deleting all of the files and reuploaded a freshly extracted beta 3 and rant it like i was installing it up until the point where it recognized that the database was already installed and everything is working now.

    At first I thought maybe cache but cache shouldn't affect server side includes?
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Well, that error appears to be from the old URL. Were you using the old URL when you got the error? Once the files are moved to the community directory then you need to specify that directory in the URL. For example:

  5. kingston

    kingston Well-Known Member

    I moved the forum to a directory and now when I type in the url with the directory the forum does not come up. I have switched it in the basic board settings.
  6. -GR-

    -GR- Well-Known Member

    I think it has something to do with an internal cache of directory structure. Maybe Zend? Removing all the files and uploading all new files like a new install did the trick for me but that shouldn't be necessary.
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Apart from the /data and /internal_data directories, everything else is kept in the DB, so doing a clean install/uploading new files wouldn't do anything.

    For reference, this is a list of all directories and files which are specific to each installation:


    The .HTACCESS is only unique if you have edited it from the default.
  8. kingston

    kingston Well-Known Member

    Is there just one point in Xenforo where the whole system looks to see where the files are located on the server in relation to the domain?
  9. Brogan

    Brogan XenForo Moderator Staff Member

    Literally all you have to do is update the URL in the ACP and move the files.

    I myself have done this several times without any issues.
  10. -GR-

    -GR- Well-Known Member

    I agree that doing a clean install/uploading new files shouldn't/wouldn't do anything. Everything with XenForo is relative paths but something is causing function include errors if you try moving XF to a different directory. Even with adjusting the admin option board url first before switching directories.

    The one thing I did notice is that if I copied XF to a different directory and left the original files in the old directory XF worked fine in the new directory, as soon as I deleted the old XF files it threw the inclusion error like mentioned above.
  11. kingston

    kingston Well-Known Member

    We are speaking of this one, correct:

  12. Brogan

    Brogan XenForo Moderator Staff Member

    That's the one :)

    All paths are relative to that.
  13. kingston

    kingston Well-Known Member

    so if have my forum in root, and then save Board URL as http://beta.fierceboard.com/forum it should then stop working... correct?

    and then when I move everything into a forum folder it should start working again?

    that is the procedure I am doing.

    also, is it it considered bad manners to quote you all the time now that you get a notification if i do quote you? i just always quote people to make it clear who i am talking to.
  14. Brogan

    Brogan XenForo Moderator Staff Member

    It won't stop working but that URL is mostly used for emails and also when you need context on the forum, we use the URL you're accessing from for the context.

    You can still navigate to the forum, whatever the URL is.

    No problem with quoting me, at least then I know there's a post I need to follow up :)
  15. kingston

    kingston Well-Known Member

    so most likely my problem is something to do with my webserver environment, not my xenforo setup?
  16. Brogan

    Brogan XenForo Moderator Staff Member

    It would seem so.
    There really isn't anything in the XenForo directories/files which could cause the problem you're seeing as everything is stored in the DB.
    kingston likes this.
  17. kingston

    kingston Well-Known Member

    any clue what it would be?

    I made a 'hello world' index.html and put it in the forum directory and went to it no problem. I have to admit this one has me stumped.
  18. Brogan

    Brogan XenForo Moderator Staff Member

    You didn't have anything in your .htaccess did you?
    Either in the old or new directories?

    Or anything set up in cPanel?

    What do you mean by "and now when I type in the url with the directory the forum does not come up"?
    What do you see exactly?
  19. kingston

    kingston Well-Known Member

    I 'turned off' .htaccess before i tried this. I dont like to change too many pieces at once. The board has friendly URL's turned off.

    cPanel? Is that like my simple control panel I use?

    if all the files are in root and i type in the domain http://beta.fierceboard.com it goes straight to the board.

    if I move all those files into a subdirectory within root called 'forum' and then type in http://beta.fierceboard.com/forum nothing shows up.

    I feel like it is something really stupid and simple I am missing.
  20. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    CPanel is a hosting control panel, but fierceboard.com is not a CPanel server. If your host gave you a different hosting control panel then you can look in there.

    This should be a simple matter. As Brogan said, there might be something else on the server that is complicating the issue. I can take a look if you want to trust me with your forum admin login and FTP information.
    Brogan likes this.

Share This Page