improvements MODX CLI advanced-upgrade #13279

carnevlu opened this Issue Feb 9, 2017 · 1 comment


None yet

2 participants

carnevlu commented Feb 9, 2017 edited


Moving a MODX website require the manually edition of the core/config/ file for multiple variable. This variable should be retrive normally from the XML config file, but actually is not the case doe all variables.
The proposition is to complete the rewrite for this variables and fix the know issues like #12621 #13241
Discussion on the forum

Step to reproduce

  1. Create a new MODX install via CLI (don't delete the setup folder)
  2. Make a BK of the current core/config/
  3. Copy the template config.dist.upgrade-advanced.xml cp ./setup/config.dist.upgrade-advanced.xml ./setup/config.xml
  4. Edit the parameters with dummy data
  5. Run the advanced upgrade MODX php ./setup/index.php --installmode=upgrade-advanced
  6. after finish compare the 2 config file you should notice that variable like:
  • $modx_assets_url normally should be equal to assets_url tag, isn't updated
  • $modx_base_url probably should be equal to context_web_url tag, isn't updated
  • $modx_manager_url normally should be equal to context_mgr_url tag, isn't updated
  • $modx_connectors_url normally should be equal to context_connectors_url tag, isn't updated

Observed behavior

see point 6.

Expected behavior

That every parameters should be updatable, and his value should be:

  • override if a new value is available in the config.xml
  • retrieved if no new value is given.

Smart analysis

  • The file is regenerated using the template available in each install /core/docs/
  • The file setup/includes/modinstall.class.php contains a method writeConfig() that can be a starter point to understand the problem... This method is run when we run the setup in advanced-upgrade


MODX version: 2.5.2-pl
MySql version: 5.6.28
PHP version: 5.6.25

Omeryl commented Feb 9, 2017 edited

Slightly unrelated to the overall problem at hand, but I highly suggest you take a look at Teleport and the snapshots it can produce. It makes the effort of moving a site, via the CLI, extremely easy:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment