ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Migration of EE site between hosting companies

April 12, 2011 7:46pm

Subscribe [8]
  • #1 / Apr 12, 2011 7:46pm

    Hi

    New to Expression Engine so please forgive what may appear to be basic questions !

    A new client has had a website hosted on another server using EE and wants to move to us.  I had to purchase a new EE commercial licence as apparently the version she was using previously didn’t belong to her !  I have installed this with no problems but am having some issues migrating the site.

    1) The client that I have purchased this licence for got her current hosting company to send through all the files and a database export required in order to migrate the website.  However, it has become clear that the EE version they were running on is older than the version I have installed.  The exp_members table for example is different and there may be other differences as well - is there a way to upgrade the old database that I have restored so that it is current for the version I have installed ?

    2) I am getting an error message when now trying to go to the control panel : “Site Error: Unable to Load Site Preferences; Invalid Preference Data” - this may be due to
    database differences ?

    3) The old hosting company also supplied a directory called “AD Site” which
    included sub-directories assets, dav3n5haw, images, js , themes and various
    files such as index.php, styles.css and license.txt (these are dated
    01/05/2010 if that helps to determine the version).  Obviously these are the
    same as some of the installed software - can you tell me what can and
    shouldn’t be installed - I haven’t yet restored any of these files some of
    which will obviously be required but many will not.

    4) Is there anything else that I need to be aware of ?

    Thanks
    Ian

  • #2 / Apr 13, 2011 5:08am

    Dave @ Exp:resso

    465 posts

    Is the old version 1.X or 2.X? You need to know this. Also you probably didn’t need to buy a new EE licence, if its legitimately for the same site then Ellislab would have understood.

    Quite a few things here that could trip you up if you haven’t used EE before. Firstly, you should install the site exactly as it was on the old server (files & database) and get that working. Note you’ll need to change the server path to that of the new server, in several places (Our reelocate module can help with this if its EE2.x.), and check all permissions and DB connection settings.

    Only once this is working you should follow the upgrade procedure, which is detailed in the documentation. Good luck!

  • #3 / Apr 13, 2011 5:27am

    Hi

    Thanks for the reply.

    This is part of the problem - I have no idea what version it is coming from and the old hosting company are not being especially helpful.  The old hosting company also refused to release the EE licence and I did query the whole situation with Ellislab and Lisa Wess said that a new licence would be required !

    How can I find out what version it was running on originally ? I presume that I then need to scrap what I have already installed, install this version (where do I get that from) restore the database from the sql file and ensure that it all works and then finally do an upgrade.

    This all sounds logical but obviously still have some questions !

    Thanks
    Ian

    Is the old version 1.X or 2.X? You need to know this. Also you probably didn’t need to buy a new EE licence, if its legitimately for the same site then Ellislab would have understood.

    Quite a few things here that could trip you up if you haven’t used EE before. Firstly, you should install the site exactly as it was on the old server (files & database) and get that working. Note you’ll need to change the server path to that of the new server, in several places (Our reelocate module can help with this if its EE2.x.), and check all permissions and DB connection settings.

    Only once this is working you should follow the upgrade procedure, which is detailed in the documentation. Good luck!

  • #4 / Apr 13, 2011 5:44am

    Dave @ Exp:resso

    465 posts

    Well if you have all files & DB from old site, you dont need anything else to get it working. Assuming your server is compatible, you just FTP all the files (this should include all EE files), import DB, check perms & server paths, check DB connection settings and you should be good to go. Then log in, and the version will be down the bottom.

  • #5 / Apr 13, 2011 6:10am

    This is the problem the files received from the old host do not include the EE files - I have a themes and images directory but no system directory ! As I said, they refused to release the EE software or licence.

    Thanks
    Ian

  • #6 / Apr 13, 2011 6:38am

    Dave @ Exp:resso

    465 posts

    Sounds like a dodgy legal issue between the client & old company… They’re obviously being difficult out of spite for losing the client. Have you tried simply asking the old host what version it was? Or you can just open system > expressionengine > config > config.php, it’ll say the app version at the top (unless ee 1.6 is different). Theres a chance that particular version is no longer available, in which case it could get messy. How big a site are we talking? Wouldn’t take too long to manually re-create it in latest ee version if its only a small one.

  • #7 / Apr 13, 2011 6:39am

    Dave @ Exp:resso

    465 posts

    oh woops, obviously you dont have the config file. Just ask old host. If they ignore you, karma will get them in the end

  • #8 / Apr 13, 2011 9:33am

    Steven Grant

    894 posts

    shame, such people like that don’t deserve to be in the EE community IMHO.

    If you can post the content of the index.php file it will go a long way to determining your version.

  • #9 / Apr 13, 2011 10:21am

    Hi

    Thanks for the on-going help !  The old host says “He believes” that it was 1.69

    What I believed happened with the old host was that he was running a multi-site licence for different clients (based on what he said about needing to retain the licence) which is obviously against EE licencing !

    The original index.php is as follows :

    <?php
    /*
    =====================================================
    ExpressionEngine - by EllisLab
    ——————————————————————————-
    http://expressionengine.com/
    ——————————————————————————-
    Copyright (c) 2003 - 2009 EllisLab, Inc.
    =====================================================
    THIS IS COPYRIGHTED SOFTWARE
    PLEASE READ THE LICENSE AGREEMENT
    http://expressionengine.com/docs/license.html
    =====================================================
    File: index.php
    ——————————————————————————-
    Purpose: Triggers the main engine
    =====================================================
    */

    // URI Type
    // This variable allows you to hard-code the URI type.
    // For most servers, 0 works fine.
    // 0 = auto
    // 1 = path_info
    // 2 = query_string

    $qtype = 0;


    // DO NOT EDIT BELOW THIS!!!

    error_reporting(0);

    if (isset($_GET[‘URL’]))
    {
    /** ---------------------------------
    /** URL Redirect for CP and Links in Comments
    /** ---------------------------------*/

    $_GET['URL'] = str_replace(array("\r", "\r\n", "\n", ':',':','/','/', '
    ', '
    ', ' ', '[removed]'),
    array('', '', '', ':', ':', '/', '/', '', '', '', ''),
    $_GET['URL']);

    if (substr($_GET['URL'], 0, 4) != "http" AND ! stristr($_GET['URL'], '://') AND substr($_GET['URL'], 0, 1) != '/')
    $_GET['URL'] = "http://".$_GET['URL'];

    $_GET['URL'] = str_replace( array('"', "'", ')', '(', ';', '}’, ‘{', 'script%', 'script&', '(', ')', '<'),
    '',
    strip_tags($_GET['URL']));

    $host = ( ! isset($_SERVER['HTTP_HOST'])) ? '' : (substr($_SERVER['HTTP_HOST'],0,4) == 'www.' ? substr($_SERVER['HTTP_HOST'], 4) : $_SERVER['HTTP_HOST']);

    if ( ! isset($_SERVER['HTTP_REFERER']) OR ! stristr($_SERVER['HTTP_REFERER'], $host))
    {
    // Possibly not from our site, so we give the user the option
    // Of clicking the link or not

    $str = "<html>\n<head>\n<title>Redirect</title>\n</head>\n<body>".
    "To proceed to the URL you have requested, click the link below:".
    "”.$_GET[‘URL’].”\n</body>\n</html>”;
      }
      else
      {
    $str = "<html>\n<head>\n<title>Redirect</title>\n".
    '<meta http-equiv="refresh" content="0; URL='.$_GET['URL'].'">'.
    "\n</head>\n<body>\n</body>\n</html>";
    }
     
      exit($str);
    }

    $uri = ‘’;
    $pathinfo = pathinfo(__FILE__);
    $ext = ( ! isset($pathinfo[‘extension’])) ? ‘.php’ : ‘.’.$pathinfo[‘extension’];
    $self = ( ! isset($pathinfo[‘basename’])) ? ‘index’.$ext : $pathinfo[‘basename’];

    $path_info = (isset($_SERVER[‘PATH_INFO’])) ? $_SERVER[‘PATH_INFO’] : @getenv(‘PATH_INFO’);
    $query_str = (isset($_SERVER[‘QUERY_STRING’])) ? $_SERVER[‘QUERY_STRING’] : @getenv(‘QUERY_STRING’);

    switch ($qtype)
    {
    case 0 : $uri = ($path_info != '' AND $path_info != "/".$self) ? $path_info : $query_str;
    break;
    case 1 : $uri = $path_info;
    break;
    case 2 : $uri = $query_str;
    break;
    }

    unset($system_path);
    unset($config_file);
    unset($path_info);
    unset($query_str);
    unset($qstr);

    require ‘path’.$ext;

    if ((isset($template_group) AND isset($template)) && $uri != ‘’ && $uri != ‘/’)
    {
    $template_group = '';
    $template = '';
    }

    if ( ! isset($system_path))
    {
    if (file_exists('install'.$ext))
    {
    header("location: install".$ext);
    exit;
    }
      else
      {
    exit("The system does not appear to be installed. Click here to install it.”); 
      }
    }

    $system_path = rtrim($system_path, ‘/’).’/’;

    if ( ! @include($system_path.‘core/core.system’.$ext))
    {
    exit("The system path does not appear to be set correctly. Please open your path.php file and correct the path.");
    }

    ?>

  • #10 / Apr 13, 2011 10:25am

    Steven Grant

    894 posts

    yes indeed, going against the licencing, I’d encourage you to flag that to Ellislab.

    Most definitely 1.6.x anyway - you will have access to 1.6.x from the downloads so you should be able to download and configure.

    Feel free to PM me or email me and I can help.

  • #11 / Apr 13, 2011 10:38am

    Hi

    It was flagged to Ellislab but they didnt seem too bothered apart from saying that it was against their licencing policy !

    I only have access to 2.1.3 no versions earlier than this

    Thanks
    Ian

  • #12 / Apr 13, 2011 11:24am

    Cem Meric

    210 posts

    This is the problem the files received from the old host do not include the EE files - I have a themes and images directory but no system directory ! As I said, they refused to release the EE software or licence.

    Sounds like they were keeping the system folder above root.

    I only have access to 2.1.3 no versions earlier than this

    You can download 1.7.1 from your EE downloads section and give that a try.

  • #13 / Apr 13, 2011 11:35am

    Mark Bowen

    12637 posts

    Although 1.7.1 may well work in this situation I would really try and get your hands on all the files that are needed for the original install. That way you will be able to get things working as they were originally and then you can update to 1.7.1 in the usual way.

    If the host has given you some of the files then surely they will give you all the files?

    Best wishes,

    Mark

  • #14 / Apr 13, 2011 11:40am

    This is the problem the files received from the old host do not include the EE files - I have a themes and images directory but no system directory ! As I said, they refused to release the EE software or licence.

    Sounds like they were keeping the system folder above root.

    I only have access to 2.1.3 no versions earlier than this

    You can download 1.7.1 from your EE downloads section and give that a try.

    Maybe they were keeping the system folder above root although that isnt the reason that we dont have them - the old hosting company refused to released the old licence or any of the software.  As mentioned in previous response, I dont have access to any versions other than 2.1.3 - so no 1.7.1 or 1.6.9 which is the version it looks like we need to restore

    Ian

  • #15 / Apr 13, 2011 11:50am

    Lisa Wess

    20502 posts

    Hi, Ian,

    Are you able to import the database to a local environment? If so, you can simply use the EE 1.7.1 files and follow the version update instructions.

    Here is a sample config.php, and a sample path.php:

    <?php
    
    // ------------------------------------------------------
    // DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO
    
    // ------------------------------------------------------
    // Path to the directory containing your backend files
    
    $system_path = "./system/";
    
    // ------------------------------------------------------
    // MANUALLY CONFIGURABLE VARIABLES
    // See user guide for more information
    // ------------------------------------------------------
    
    $template_group = "";
    $template = "";
    $site_url = "";
    $site_index = "";
    $site_404 = "";
    $global_vars = array(); // This array must be associative
    
    ?>

    which should be the only two EE 1 files that are custom to your site, that you’ll need to reinstate before trying the upgrade.

    You do also own an EE 2 commercial license, so you do have access to EE 1.  Simply choose to download EE 2, then under the license agreement, choose the radio button for EE 1 instead.

    Does that help?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases