generalmodx

Upgrade MODX

It is strongly recommended to create a backup before starting the update process. If you have important data, create and try to restore a backup to ensure that everything works properly.

To upgrade to the latest version of MODX, follow these steps:

NOTE: The steps below are only applicable to MODX 3.x. If you are upgrading from 2.x, please follow the official steps.

  • Log out of the MODX Web-based administration panel if you are currently logged in.

  • Stop the servers:

      $ sudo /opt/bitnami/ctlscript.sh stop apache
      $ sudo /opt/bitnami/ctlscript.sh stop mysql
    
  • Clear the contents of the MODX cache directory:

      $ rm -rf /opt/bitnami/modx/core/cache/*
    
  • Install the rsync utility:

          $ sudo apt-get install rsync
    
  • Download the latest version of MODX from the official website.

  • Uncompress the downloaded archive to a temporary directory on your system:

      $ cd /tmp
      $ unzip modx-3.x.y.zip
    
  • Merge (don’t overwrite) the new MODX files with the existing files using rsync and update their permissions. Note that the core directory is to be placed in a different location in the Bitnami MODX stack and is therefore copied separately.

      $ rsync -avuh /tmp/modx-3.x.y/ /opt/bitnami/modx/
      $ sudo find /opt/bitnami/modx/ -type d -exec chmod 775 {} \;
      $ sudo find /opt/bitnami/modx/ -type f -exec chmod 664 {} \;
    
  • Ensure that the /opt/bitnami/modx/ directory is writable by the Web server user:

      $ sudo chown -R bitnami:daemon /opt/bitnami/modx/
    
  • Restart the servers:

      $ sudo /opt/bitnami/ctlscript.sh start apache
      $ sudo /opt/bitnami/ctlscript.sh start mysql
    
  • Browse to http://SERVER-IP/setup.

  • You should see a welcome screen like the one below. Select your language and click ‘Next’.

    MODX upgrade

  • Proceed through the upgrade process. Remember to select the “Upgrade Existing Install” option on the “Install Options” page.

    MODX upgrade

    NOTE: If the “Upgrade Existing Install” option is not available, refer to the MODX upgrade troubleshooting instructions. Avoid selecting “New Installation” on this page as doing so will overwrite all your existing MODX data.

  • On the “Installation Summary” page, ensure that all checks are passed. In case of errors, refer to the MODX upgrade troubleshooting instructions. If all checks pass, click “Install” to proceed.

    MODX upgrade

  • Once installation is complete, check the box to delete the setup/ directory and log in to MODX again to access the upgraded version.

    MODX upgrade

    NOTE: It is important to verify that the setup/ directory has been deleted. If not, delete it manually.

Last modification May 10, 2022