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

How to move xenforo to another domain?

Discussion in 'XenForo Questions and Support' started by D37, Oct 25, 2010.

  1. D37

    D37 Active Member

    I would like to move my xenforo installation to another domain. How do I go about doing so?

    Do I just copy the files over? and how would I change the database info?
     
  2. Carlos

    Carlos Well-Known Member

    just change the folder name where you have the domain pointed at.
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    1) Copy over the files. You can use FTP for this. Or you can use shell access if you are comfortable with that.

    2) Copy over the database. This requires manually backing up the database on the old server, copying over the backup file to the new server, and then restoring the backup file on the new server. I recommend using shell access to run the backup / restore commands if your host allows you shell access.

    Standard backup command for *nix servers:

    mysqldump --opt -uUSERNAME -pPASSWORD DBNAME > backup.sql

    Standard restore command for *nix servers:

    mysql -uUSERNAME -pPASSWORD DBNAME < backup.sql

    3) Edit the library/config.php file on the new server to point to the database on the new server.

    4) Update your board URL:

    Admin CP -> Home -> Options -> Basic Board Information -> Board URL

    That should do it.
     
    Jethro likes this.
  4. Brandon Sheley

    Brandon Sheley Well-Known Member

    Sorry to bump an old thread, but where in the database would I need to change the board URL if I can't access the admincp?

    thx

    edit.. actually I don't need this anymore, but it might be nice to know in the future
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It's the xf_data_registry table with data_key = options (contains serialized data, normally you can't directly edit this). The registry caches the options. The source data is in the xf_option table.

    You shouldn't edit this in the database. Instead you should regain access to the Admin CP and edit it there so the cache is rebuilt.
     
  6. RSI

    RSI Active Member

    Sorry, but here's another bump of this old thread...

    I just moved my install to another server doing it exactly how it was described in this thread. I updated the info in the config.php file with the new dB name and password, but I cannot get into my Admin CP or board in general. When I try to access my site it says "An unexpected database error occurred. Please try again later."

    It's not the server and I have uploaded all of the files and directory structure to the root and have installed the SQL dB backup file correctly using the restore function in my new cPanel. I did have to rename it though because it renames it anyway with the new prefix and I created a new dB user with new password. Again, I've edited the config.php file with the updated info.

    How can I get into my Admin CP or rebuild the cache?

    Thanks
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    View the page source and the error details will be displayed.

    It's going to something like the MySQLi extension missing from the new server.
     
  8. RSI

    RSI Active Member

    Thanks, it says ... <!-- The Mysqli extension is required for this adapter but the extension is not loaded -->

    What does that mean exactly? Do I need to contact the hosting company or is it something that I can correct myself?
    .
     
  9. The Forum Heroes

    The Forum Heroes Well-Known Member

    Yes, just as it says, it doesn't have the MySQLi extension in PHP. Your host needs to include it and recompile Apache.
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    When switching hosts/servers. you should always confirm the server meets the minimum requirements listed here: https://xenforo.com/purchase/
     
  11. RSI

    RSI Active Member

    Ok thanks, they advertised they support xenforo, but they might have just stuck me on a sever that didn't have the extension installed.

    Thanks for the help..
     
  12. RSI

    RSI Active Member

    Turns out that when I transferred everything to the new server I also transfered the php.ini file from the old server as well so it was messing up the communication to the extensions on the new server.

    Was just a brain-fart on my part.

    Lesson to be learned, don’t transfer your php.ini file :rolleyes:
    .
     

Share This Page