How to change hosting

Discussion in 'Installation and Updates' started by walter causero, Jun 6, 2006.

  1. walter causero

    walter causero Paid Customer

    Could someone please explain how can I change my hosting keeping everything working?

    Can I just export the database, move the files and reimport the database or should I do something else?

    Thanks :)
  2. WTM

    WTM Loyal User

    I would do fresh install on new host, than create sql file from old database and import it to new one
  3. walter causero

    walter causero Paid Customer

    I can do that from the admin menu, right?
    Manage database > export
    ...

    And then on the new host
    Manage database > import

    But... Do I have to export ALL the tables/fields or just some of them?

    Which checkboxes should I check in the form?
    - Structure
    - Add DROP TABLE
    - Data
    - Complete inserts
    - Use real tables prefix
    - Save as file
  4. WTM

    WTM Loyal User

    I did it from phpMyAdmin.
    First - create new database on your new host
    Second - do fresh install of the script on your new host with this new database (make sure you give tables same presets as your old database, example dir_)
    If you login to phpMy Admin for old database there is an option to save it as sql - save it on your hd.
    Than login to phpMy Admin for your new database (with your new host)
    1. Open SQL Query window
    2. Browse for sql file on you hd that you just created
    5. Click "Go" - and you are done
    Last edited: Jun 7, 2006
  5. walter causero

    walter causero Paid Customer

    Code:
    CREATE TABLE `dir_admins` (
    `id` tinyint( 3 ) unsigned NOT NULL AUTO_INCREMENT ,
    `username` varchar( 50 ) NOT NULL default '',
    `password` varchar( 32 ) NOT NULL default '',
    `fullname` varchar( 100 ) NOT NULL default '',
    `email` varchar( 100 ) NOT NULL default '',
    `submit_notif` enum( '0', '1' ) NOT NULL default '0',
    `payment_notif` enum( '0', '1' ) NOT NULL default '0',
    `super` enum( '0', '1' ) NOT NULL default '1',
    `status` enum( 'approval', 'active' ) NOT NULL default 'active',
    `database` enum( '0', '1' ) NOT NULL default '0',
    `editors` enum( '0', '1' ) NOT NULL default '0',
    `config` enum( '0', '1' ) NOT NULL default '0',
    `pages` enum( '0', '1' ) NOT NULL default '0',
    `fields` enum( '0', '1' ) NOT NULL default '0',
    `plans` enum( '0', '1' ) NOT NULL default '0',
    `news` enum( '0', '1' ) NOT NULL default '0',
    `theme` enum( '0', '1' ) NOT NULL default '0',
    `language` enum( '0', '1' ) NOT NULL default '0',
    PRIMARY KEY ( `id` )
    ) TYPE = MYISAM PACK_KEYS =0 AUTO_INCREMENT =2;
    
    MySQL said: Documentation
    #1050 - Table 'dir_admins' already exists 
    :wallbash:

    Any idea?
  6. Vasily B.

    Vasily B. Administrator Staff Member

    #1. create a dump of your previous version with the following options:
    use admin panel -> manage database -> export

    categories list:
    dir_categories
    dir_flat_structure
    dir_link_categories
    dir_links
    dir_sequences

    Structure - No
    Add DROP TABLE - No
    Data - Yes
    Complete inserts - Yes
    Use real tables prefix -Yes
    Save as file - Yes

    #2. reupload the files from your old server to a new one
    #3. install the software
    #4. go to admin panel -> sql
    run the following queries:
    4.a
    click go
    4.b
    click go
    #5. click import
    Import your data from a file.

    Now you should have your information migrated.

    There is another way. I think it's some easier.

    #1. upload your current files to a new server
    #2. create a full dump of your database
    #3. create a database on a new server + import the database of your previous server
    #4. configure your includes/config.inc.php file
    there are some settings that should be modified:
    PHP:
    $gDirConfig['base']            = 'full url to your site';
    $gDirConfig['dir_path']        = 'full path to esyndicat directory';
    $gDirConfig['dir']            = 'subdirectory where you installed esyndicat';
    $gDirConfig['lang_path']    = "new path to lang dir";
    $gDirConfig['dbhost']        = 'localhost';
    $gDirConfig['dbuser']        = 'dbusername';
    $gDirConfig['dbpwd']        = 'dbpassword';
    $gDirConfig['dbname']        = 'dbname';
    $gDirConfig['prefix']        = 'dir_';
    That's all.

    Please ask in case you have any questions.
    Last edited: Jun 7, 2006
  7. walter causero

    walter causero Paid Customer

    It worked, thank you!
    :dance2:
  8. safatweb

    safatweb Anil

    I am late, but for others to know. just ask your new hosting firm to copy the entire site to their server(if Cpanel), and what you have to do is just change the dns for domain(in control panel with the domain provider), so dont have to transfer or redesign. just relax no downtime no errors on site :)
    Last edited: Jun 20, 2006
  9. Vasily B.

    Vasily B. Administrator Staff Member

    I'm glad to advise :)

    2 safatweb:
    very interesting solution :good:

Share This Page