We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    First, delete all files in the core/cache directory.

    Check the config.core.php file in the modx root, manager, and connectors folders

    Double-check the connectors path in core/config/config.inc.php

    The 500 error often means a PHP syntax error in PHP7, so make sure you didn't accidentally delete a semicolon, period, or quote mark.

    If you have a good code editor, you can paste the content of a config file into a file with a .php extension to see if it reports any syntax errors. Don't forget the <?php at the top. The Ace editor in MODX has some syntax checking, but a good code editor will do a more detailed check.
      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
      • 54295
      • 2 Posts
      Quote from: BobRay at Sep 20, 2017, 09:33 PM
      Another option is to move the core folder above the web root. That way, no core files will ever be accessible via the web.

      To do that, you need to modify the three config.core.php files (in the root, manager, connectors folders), and update core/config/config.inc.php.


      Hi

      I have little knowledge of this, specifically what would I have to edit in the files you mention?

      Thanks.
        • 38783
        • 571 Posts
        Quote from: marlore at May 30, 2018, 05:39 PM

        I have little knowledge of this, specifically what would I have to edit in the files you mention?

        This document provides some detail on the subject of securing MODX and moving the core folder
        https://docs.modx.com/revolution/2.x/administering-your-site/security/hardening-modx-revolution [ed. note: andytough last edited this post 5 years, 9 months ago.]
          If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

          email: [email protected] | website: https://andytough.com
          • 53414
          • 34 Posts
          Quote from: andytough at May 30, 2018, 08:58 PM
          From the Modx Docs it has the following example on moving the Modx Core

          One simple place to put it is simply one folder above your document root, i.e. <sub>/core/</sub> instead of /public_html/core/.

          What do they mean <sub>/core/</sub>? My modx was setup by a developer, who abandoned the
          project after install. I have cores in 2 places. Note that I cannot go any than top-level. I can move and edit all the files tho thru my webserver ftp. They did install wierd names for the manager, & connectors which is a +.

          top-level/my-domain-1.com/core
          top-level/my-domain-1.com/www/modx/core


          Once you move it, you'll have to update the following configuration details:

          core/config/config.inc.php (change the $modx_core_path variable)
          /config.core.php (at the site root)
          /connectors/config.core.php
          /manager/config.core.php
            • 46886
            • 1,154 Posts
            Ok this is all on the server, you have to go into your hosting account and edit the files on the server.

            In the server, all the Modx stuff is within the public_html folder. Usually in this folder there is a /core folder, /connectors and then the manager folder, which maybe is manager or maybe is custom name like nuanswebsite or whatever, its better to customize the name of the manager for security, but you must be careful to make all the proper paths.

            Some people will have the whole Modx in a subfolder, Julius I believe you have a structure like this, not sure about Marlore.

            Generally, back to the public_html folder on the server side, the config files you need are in

            core/config/config.inc.php (change the $modx_core_path variable)

            /config.core.php (at the site root) (this one is in that public_html folder near the bottom)

            /connectors/config.core.php

            /manager/config.core.php

            Let's get more info and figure out the right code to put in

            Generally the paths when the site is *NOT* in a subfolder are something like this

            if (!defined('MODX_CORE_PATH')) {
                $modx_core_path= '/home/accountname/public_html/core/';
                define('MODX_CORE_PATH', $modx_core_path);
            }
            if (!defined('MODX_PROCESSORS_PATH')) {
                $modx_processors_path= '/home/accountname/public_html/core/model/modx/processors/';
                define('MODX_PROCESSORS_PATH', $modx_processors_path);
            }
            if (!defined('MODX_CONNECTORS_PATH')) {
                $modx_connectors_path= '/home/accountname/public_html/connectors/';
                $modx_connectors_url= '/connectors/';
                define('MODX_CONNECTORS_PATH', $modx_connectors_path);
                define('MODX_CONNECTORS_URL', $modx_connectors_url);
            }
            if (!defined('MODX_MANAGER_PATH')) {
                $modx_manager_path= '/home/accountname/public_html/custommanagerfoldername/';
                $modx_manager_url= '/custommanagerfoldername/';
                define('MODX_MANAGER_PATH', $modx_manager_path);
                define('MODX_MANAGER_URL', $modx_manager_url);
            }
            if (!defined('MODX_BASE_PATH')) {
                $modx_base_path= '/home/accountname/public_html/';
                $modx_base_url= '/';
                define('MODX_BASE_PATH', $modx_base_path);
                define('MODX_BASE_URL', $modx_base_url);
            }


            The custom manager folder is part of hardening a Modx installation

            https://docs.modx.com/revolution/2.x/administering-your-site/security/hardening-modx-revolution

            https://docs.modx.com/revolution/2.x/getting-started/installation/advanced-installation