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

    I did a stupid thing, and deleted a MODX install, leaving me with just the MODX database to restore a site from.

    In order to recreate the site, I took the following steps:


    1. I ran a clean install of MODX 2.2.4, which is the version of the old site
    2. I replaced the database credentials of the clean install with those of the old MODX site in /core/config/config.inc.php

    However, I cannot log in. Are there further changes to me made? For instance:

    $lastInstallTime = XXXXX;
    
    $site_id = 'modxXXXXXX';
    $site_sessionname = 'XXXXXX';
    $https_port = '443';
    $uuid = 'XXXXX';


    also appear in the file.

    Or should it just work to change

    $database_user = ';
    $database_password = ';
    $database_connection_charset = 'latin1';
    $dbase = '';


    Thanks for any pointers you can give me

    Jim
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Make sure your browser cache and cookies are cleared. Make sure that the two references to the database charset in config.inc.php are correct for the original database. And don't forget the line in the config.inc.php file
      $database_dsn = 'mysql:host=localhost;dbname=<dbname>;charset=<db-charset>';

        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        And once you get it all back working, make sure you create a full backup of your site at regular intervals.
          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
          • 37514
          • 178 Posts
          Thanks Susan, that has worked and I am in the manager.

          The missing packages is giving the "Package Management" some trouble. I am thinking this may be tricky. Is there any easy way to "disable" packages via MySQL/ phpMyAdmin so I can try reinstalling them?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Empty the transport_packages table, and possibly the namespaces and workspaces tables as well (don't remove the default core namespace and workspace!)
              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
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Actually you can backup those tables to use them to know what extras you had.
                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