We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26334
    • 77 Posts
    OK we installed a beta version in 2009 and used it for development of a new site in our "spare time" with no hurry as the site wasn’t live and it was a "when we had time" project.

    Site still isn’t live but we have started to put some work into it so I figured before we went very far I would upgrade to current version of Rev. Fortunately the pl one was just released smiley

    When I try to upgrade our b4 version however the install doesn’t give me the option of upgrading, just a fresh install. When it checks the database it wont proceed because the database prefix is already in use.

    Whilst the project has been in background I really don’t want to lose everything that was done over the last year by clearing the database.

    Is there any way around this?

    First install screen :
    - New Installation
    - Upgrade Existing Install
    - Advanced Upgrade Install
    (edit database config)

    The radio buttons next to Upgrade or Advanced wont let me check them, they are greyed out. I only have the option of New Installation.

    Any way around this?
      • 3749
      • 24,544 Posts
      I’m guessing here, somewhat, and Opengeek or splittingred could give you a more definitive answer. I’m almost sure there’s a way to upgrade from where you are to the pl release.

      I think setup currently checks for the existence of core/config/config.inc.php to enable the "upgrade" button. Do you have that file?

      Also, look in the root of your install for config.core.php.

      It should look like this:

      <?php
      define('MODX_CORE_PATH', 'path/to/your/core/');
      define('MODX_CONFIG_KEY', 'config');
      ?>
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 28215
        • 4,149 Posts
        Also check to see if you have a core/config/config.inc.php.

        If that’s gone, well, it gets harder. You’ll need to copy the file core/docs/config.inc.tpl file to core/config/config.inc.php, make it writable, and then edit the {} placeholders in it to be proper values...
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 3749
          • 24,544 Posts
          Here’s my core/config/config.inc.php file with some notes on modifying it. My site root is the /MODx097/ directory. Note that all paths and URLs end in a slash.

          <?php
          /**
           *  MODx Configuration file
           */
          $database_type = 'mysql';
          $database_server = 'localhost';
          $database_user = 'YourDB-UserName';
          $database_password = 'YourDB-Password';
          $database_connection_charset = 'latin1';  // your charset (utf8?)
          $dbase = '`YourDbaseName`';
          $table_prefix = 'modx_';   // or your table prefix    
          
          $lastInstallTime = 1279419768;
          
          $site_id = 'modx4c426578f385a5.20711411';   // I think these are 
          $site_sessionname = 'SN4afba9c22b725';         // arbitrary -- not sure
          $https_port = '443';
          
          if (!defined('MODX_CORE_PATH')) {
              $modx_core_path= 'C:/xampp/htdocs/MODx097/core/';   // your core path
              define('MODX_CORE_PATH', $modx_core_path);
          }
          if (!defined('MODX_PROCESSORS_PATH')) {
              $modx_processors_path= 'C:/xampp/htdocs/MODx097/core/model/modx/processors/';  // Your processor path
              define('MODX_PROCESSORS_PATH', $modx_processors_path);
          }
          if (!defined('MODX_CONNECTORS_PATH')) {
              $modx_connectors_path= 'C:/xampp/htdocs/MODx097/connectors/';  // your connectors path
              $modx_connectors_url= '/modx097/connectors/';                                  // your connectors URL
              define('MODX_CONNECTORS_PATH', $modx_connectors_path);
              define('MODX_CONNECTORS_URL', $modx_connectors_url);
          }
          if (!defined('MODX_MANAGER_PATH')) {
              $modx_manager_path= 'C:/xampp/htdocs/MODx097/manager/';  // Your manager path
              $modx_manager_url= '/modx097/manager/';                                 //your manager URL
              define('MODX_MANAGER_PATH', $modx_manager_path);
              define('MODX_MANAGER_URL', $modx_manager_url);
          }
          if (!defined('MODX_BASE_PATH')) {
              $modx_base_path= 'C:/xampp/htdocs/MODx097/';  // Your base path
              $modx_base_url= '/modx097/';                                  // Your base URL
              define('MODX_BASE_PATH', $modx_base_path);
              define('MODX_BASE_URL', $modx_base_url);
          }
          if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
          	$isSecureRequest = false;
          } else {
          	$isSecureRequest = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port);
          }
          if (!defined('MODX_URL_SCHEME')) {
              $url_scheme=  $isSecureRequest ? 'https://' : 'http://';
              define('MODX_URL_SCHEME', $url_scheme);
          }
          if (!defined('MODX_HTTP_HOST')) {
          	if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
          		$http_host='localhost';
          		define('MODX_HTTP_HOST', $http_host);
          	} else {
          		$http_host= $_SERVER['HTTP_HOST'];
          		if ($_SERVER['SERVER_PORT'] != 80) {
          			$http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
          		}
          		$http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
          		define('MODX_HTTP_HOST', $http_host);
          	}
          }
          if (!defined('MODX_SITE_URL')) {
              $site_url= $url_scheme . $http_host . MODX_BASE_URL;
              define('MODX_SITE_URL', $site_url);
          }
          if (!defined('MODX_ASSETS_PATH')) {
              $modx_assets_path= 'C:/xampp/htdocs/MODx097/assets/';  // your assest path
              $modx_assets_url= '/modx097/assets/';                                 // your assets URL
              define('MODX_ASSETS_PATH', $modx_assets_path);
              define('MODX_ASSETS_URL', $modx_assets_url);
          }
          if (!defined('MODX_LOG_LEVEL_FATAL')) {
              define('MODX_LOG_LEVEL_FATAL', 0);
              define('MODX_LOG_LEVEL_ERROR', 1);
              define('MODX_LOG_LEVEL_WARN', 2);
              define('MODX_LOG_LEVEL_INFO', 3);
              define('MODX_LOG_LEVEL_DEBUG', 4);
          }
          if (!defined('MODX_CACHE_DISABLED')) {
              $modx_cache_disabled= false;
              define('MODX_CACHE_DISABLED', $modx_cache_disabled);
          }
          
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 26334
            • 77 Posts
            Thanks guys

            core/config/config.inc.php

            Was the key. I moved the core to a backup location and moved the new core there and didn’t take that config file over.

            Much appreciated.