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

Add a table prefix to XenForo

Discussion in 'XenForo Development Discussions' started by Lu Jia, May 21, 2012.

  1. Lu Jia

    Lu Jia Active Member

    Hi all,
    I want to know if someone knows which file/files should I edit if i want to add a prefix to all xenforo's table.
    Thanks in advance :)
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    This isn't possible, unfortunately.

    The XenForo developers decided for a number of reasons that the XenForo database table prefix would be hard coded as xf_.

    This is why it's not possible to specify your own prefix, and also why it is infeasible to edit any files to make it happen: It isn't a variable so you would probably need to edit nearly three thousand files to hard code it back to anything else. This is definitely not recommended! Nor would it be supported by any add-on.

    Why do you need this ability to change the prefix?
     
  3. Robbo

    Robbo Well-Known Member

    You could inject your own database object. You would need to know what you are doing though.
     
  4. Lu Jia

    Lu Jia Active Member

    Because I want to try to run 2 boards with the same database.
     
  5. Chris D

    Chris D XenForo Developer Staff Member

    Yeah that isn't possible unfortunately.
     

Share This Page