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

[Question] Test settings migrated to live?

Discussion in 'XenForo Questions and Support' started by SchmitzIT, Jan 17, 2011.

  1. SchmitzIT

    SchmitzIT Well-Known Member

    For the time being we are running a test setup of XF, where we tweak quite a bit of settings and what not to try and regenerate as much functionality as we possibly can.

    What would be the easiest way for us to retain these tweaks once we plan to actually go-live with XF? In case of cosmetics, I assume we can just export our style, and reimport that. But what about actual XF Configuration settings and/or pages?

    We currently used the vB4 importer made by Paul, but I do not think I can use that twice for the same copy of the database, so are there any other fast ways to export settings etc?

    Thanks :)
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Personally I am taking this approach.

    Set up a clean new installation with the settings, style, usergroups, permissions, forums, Pages, etc, that I want to have.
    There is only 1 member in the forum (Admin) and no posts.

    At the same time I am running a test installation where I am checking how everything works.

    Then I will import my existing site (phpBB) to my test installation and detail the steps that need to be taken such as moving threads to the correct forum, moving members to the correct usergroups, etc.

    Finally I will import my existing site (phpBB) into my live installation using the notes gained from the test import.

    Just remember that in XenForo, everything except avatars and attachments is stored in the database.
  3. SchmitzIT

    SchmitzIT Well-Known Member

    That sounds like my approach. I'm mostly hoping for a more automated approach when it comes to the configurational settings. I'm bound to overlook something somewhere.

    I'm actually thinking of developing a dynamic script that will pull out my settings from the test database, and generates a list of INSERT statements to be fired onto the new database when ready, or something along those lines.

    Alternatively, perhaps some kind of a cofiguration add-on that exports this info as an XML file. Could be useful perhaps for when one admins multiple XF sites, or for troubleshooting purposes.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    One thing I would suggest is to do as much tidying and pruning of your existing vB database as you can before importing.
    Most problems seem to be related to old deleted usergroups/permissions which are still hanging around in the database, etc.
    Dean likes this.
  5. SchmitzIT

    SchmitzIT Well-Known Member

    Definitly a good idea, and I have been. Already uninstalled a few mods and removed some redundant groups and what not.

    Just to elaborate, though, I'm talking about retaining XF settings from my test-database/test XF installation, so I do not have to do them again when I do my go-live migration.

    But yeah, I love the idea of the XF-switch being a fresh start, allowing me to get rid of a lot of the bloat that has cluttered up my vB installation (both in the database as well as in the filesystem). Not all mods that I removed fully cleaned up after themselves, and the switch will allow me to do just that :)
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Well you can import your test XF database to your live XF install which will then make it identical.

    So just to clarify, this will be my precise plan:

    Import my clean XF database which has all of my final settings, etc. to my test database.
    This then makes my test database match what will be my live installation.

    Import my phpBB database into my test XF database as a trial run.

    Finally import my phpBB database into my clean/live XF database.
  7. SchmitzIT

    SchmitzIT Well-Known Member

    Our upgrade is running as I type this. We are just reusing our test forum, albeit I manually deleted quite a bit of the earlier imported data, and have been resetting auto_incremement columns.

    I'm keeping a script with what I did so others might benefit from that :) I will make it available when we are done.
  8. Kevin

    Kevin Well-Known Member

    SchmitzIT, any chance you kept that script around? I'm in a position where I'll be setting about 4-5 new XF sites from scratch and it'd be a big time saver to be able to export the basic settings from one installation to another.
  9. SchmitzIT

    SchmitzIT Well-Known Member

    As a matter of fact, I did. I posted it here, but will add the full script to this thread again, because this might be an easier spot to find it when people search for it.

    DELETE FROM xf_user_group WHERE user_group_id >= 5;
    DELETE FROM xf_user WHERE user_id != 1;
    DELETE FROM xf_admin WHERE user_id != 1;
    ALTER TABLE xf_user_group AUTO_INCREMENT = 5;
    TRUNCATE TABLE xf_thread;
    TRUNCATE TABLE xf_post;
    DELETE FROM xf_user_authenticate WHERE user_id != 1;
    TRUNCATE TABLE xf_user_group_relation;
    TRUNCATE TABLE xf_user_ban;
    TRUNCATE TABLE xf_user_external_auth;
    TRUNCATE TABLE xf_user_alert;
    TRUNCATE TABLE xf_user_follow;
    TRUNCATE TABLE xf_user_identity;
    TRUNCATE TABLE xf_user_news_feed_cache;
    DELETE FROM xf_user_option WHERE user_id > 1;
    DELETE FROM xf_user_privacy WHERE user_id > 1;
    DELETE FROM xf_user_profile WHERE user_id > 1;
    TRUNCATE TABLE xf_user_status;
    TRUNCATE TABLE xf_user_trophy;
    TRUNCATE TABLE xf_conversation_master;
    TRUNCATE TABLE xf_conversation_message;
    TRUNCATE TABLE xf_conversation_recipient;
    TRUNCATE TABLE xf_conversation_user;
    TRUNCATE TABLE xf_error_log;
    TRUNCATE TABLE xf_forum;
    TRUNCATE TABLE xf_link_forum;
    TRUNCATE TABLE xf_import_log;
    TRUNCATE TABLE xf_liked_content;
    TRUNCATE TABLE xf_moderation_queue;
    TRUNCATE TABLE xf_moderator;
    TRUNCATE TABLE xf_moderator_content;
    TRUNCATE TABLE xf_node;
    TRUNCATE TABLE xf_poll;
    TRUNCATE TABLE xf_poll_response;
    TRUNCATE TABLE xf_poll_vote;
    TRUNCATE TABLE xf_profile_post;
    TRUNCATE TABLE xf_search;
    TRUNCATE TABLE xf_search_index;
    TRUNCATE TABLE xf_session;
    TRUNCATE TABLE xf_session_activity;
    TRUNCATE TABLE xf_thread_user_post;
    TRUNCATE TABLE xf_thread_watch;
    TRUNCATE TABLE xf_trophy;
    TRUNCATE TABLE xf_attachment;
    TRUNCATE TABLE xf_attachment_data;
    TRUNCATE TABLE xf_attachment_view;
    Kevin likes this.
  10. Kevin

    Kevin Well-Known Member

    Thanks! :cool: That'll come in handy for some XF stuff I'm doing this week.

Share This Page