We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53877
    • 18 Posts
    Hey guys, I know this is going to sound really bad, but I am new to Modx and still trying to figure out what is going on with this site I'm managing. First off, we had a web dev just leave out of the blue so I'm left behind picking up where he left off.

    Here's my issue: I have a username and password to be able to login into the Modx Manager, but this user doesn't give me privileges to change certain content of the website so I need the admin info. I cannot find it anywhere, I even tried updating it in phpmyadmin but no changes are made.

    In my phpmyadmin, there are two databases that I tested this for, also in Cpanel, when I remove all of the files in public_html just to see if something will change on the website... nothing happens. (AHHH!) I am very confused and frustrated because we are hosting this website, but I guess I must be missing the database somewhere??

    Any info helps! Thanks.

    This question has been answered by BobRay. See the first response.

    • discuss.answer
      • 3749
      • 24,544 Posts
      1. If there is a core/ directory at the MODX root, skip the next step and just go there.

      2. Look in the root of the site at the config.core.php file. The first path there will be the path to the MODX core directory.

      3. Look in that core directory at the config.inc.php file to see the name of the database MODX is using.

      4. Go into that Database in PhpMyAdmin, and in the modx_users table, find your user's record and set the 'sudo' field to 1 -- that should let you do anything in the Manager.

      For security, you probably don't want to leave yourself as a sudo user forever. Adding yourself to the Administrator user group may give you full rights. If you're already a member of the Administrator group, change your role in the group to 'Admin Super User'.

      Welcome to MODX. smiley
        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
        • 51553
        • 18 Posts
        BobRay sounds like he's got your question covered, but I will add a few thoughts to your original post:

        1) If you're attempting to overwrite the admin account's password in phpmyadmin don't forget to use the MD5 function, or visit this article:
        https://docs.modx.com/revolution/2.x/administering-your-site/security/troubleshooting-security/resetting-a-user-password-manually

        2) If you deleted all the files (except the mandatory modx files: index.php, config.core.php) from public_html, this likely points to a case where MODx may have been "hardened", which is where the core MODx folder may not reside in the public_html folder (to make the website more secure), and the cache folder sits inside the core folder. If none of the folders on the server seem to be named in some derivation of the word "core" or "modx", try looking for a folder that has some or all of the following sub-folders outside of the public_html directory: cache, components, config, docs, error, export, import, lexicon, model, packages, xpdo - a folder with all of these sub-folders might very well be your modx core folder. If this is indeed your core modx folder, refer to BobRay's suggestion in #3 of his post.

        3) This may sound silly, but if you've never logged into the cPanel prior to this incident, also double check that the server your logging into is actually the server that is delivering the website. Since the URL you would have used to log into MODx is tied directly to the domain, make sure that the domain is pointing to the server you are logging into.

        Hope some of that helps! If neither BobRay or myself have solved your problem, maybe give us a little more information about what you've found out so far and maybe we can help you figure out what is going on smiley
          ---
          Chris Holowatyj
          Keddy & Associates - Web Design Professionals
          https://keddyandassociates.com
          [email protected]
          • 53877
          • 18 Posts
          Thank you!!!
            • 53877
            • 18 Posts
            Thanks so much!!