We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!

Answered Recover old site

    • 40967
    • 17 Posts
    I have a backup of an old Revo site that I am trying to restore on a different server. Installed new version of Revo with a scripted installation from my host (hostgator) -- top of manager screen says 2.2.12-pl. It is a shared hosting account, so I don't really have access to the unix file system.

    With respect to the old site, there is no active installation, just the backup. I don't know what version it is -- can somebody tell me where I can find that? I think it is an early version of 2.2, but I'm not sure. I have installed the data base, and uploaded the files.

    Now I'm stuck on what to do to get it up and running. Can I move the old stuff into the new install? Do I need to get the old one working and upgrade? I have not successfully done that yet.

    I'm looking for advice, or a link to documentation that would help with this.

    TIA
    Rick.

    This question has been answered by multiple community members. See the first response.

    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If it is a full backup, you can simply put the files wherever it seems appropriate, and import the database.

      You will need to modify four files: config.core.php, connectors/config.core.php, manager/config.core.php - these are to specify the path to the MODX core. This should be the absolute file path according to the server's file system. For example,
      define('MODX_CORE_PATH', '/Applications/MAMP/htdocs/templates.modx/core/');
      

      I have this installation in a subdirectory named "templates.modx" on my localhost, using MAMP. If it were in the web root, it would be
      define('MODX_CORE_PATH', '/Applications/MAMP/htdocs/core/');


      The core/config/config.inc.php file needs to be edited extensively to correct the database connection information as well as all of the paths. One example of part of these settings is
      if (!defined('MODX_MANAGER_PATH')) {
          $modx_manager_path= '/Applications/MAMP/htdocs/templates.modx/manager/';
          $modx_manager_url= '/templates.modx/manager/';
          define('MODX_MANAGER_PATH', $modx_manager_path);
          define('MODX_MANAGER_URL', $modx_manager_url);
      }


      You especially need to take care to not miss the $database_dsn line, one of mine looks like this
      $database_dsn = 'mysql:host=localhost;dbname=templates;charset=utf8';
      

      and also it's easy to miss the paths for the assets directory, they are defined near the bottom of the config.inc.php file.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • discuss.answer
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Oh, and one other thing, once the files are in place, go into the core/cache/ and delete all of the directories there. MODX will rebuild them as needed. You don't want any of the old cache files there, since they'll be reflecting all of the old paths and URLs.

        You can find the version in the database or in the cached files, in either case you want system_settings, and look for the 'settings_version' setting.
          'settings_version' => '2.5.0-rc1',
        

          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 40967
          • 17 Posts
          Thanks Sottwell!!

          Your advice was exactly right and I was able to get the site back up. Very much appreciated.

          Rick.