We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16654
    • 23 Posts
    Hi...
    a bit confused about the changes to be made to this file when uploading to a remote server.
    The instructions in the MODx documentation for moving a site (step 3) say to "edit config.inc.php with the remote database connection settings for the deployment server". I’m not sure what these are.

    At http://www.codeistry.com/help/uploading-downloading-and-backing-up-modx-sites I found these instructions:

    config.inc.php

    The first changes need to be made to the config.inc.php file. This can be found in /manager/includes/config.inc.php. Open this file in a text editor and change the bold values in the first few lines to match your setup:

    /** * MODx Configuration file */ $database_type = ’mysql’; $database_server = ’localhost’; $database_user = ’db_username’; $database_password = ’db_password’; $database_connection_charset = ’latin1’; $database_connection_method = ’SET CHARACTER SET’; $dbase = ’`modx_sitename`’; $table_prefix = ’tableprefix_’;

    Questions:
    1. What does ’localhost’ change to (an example here may help... )?
    2. What is the ’tableprefix’ (in my local config.inc.php there is no tableprefix)?

    Any help with this will be greatly appreciated...

    Thanks, Larry
      • 3749
      • 24,544 Posts
      Basically, the changes are needed because the DB name, user, and password may not be the same on the remote host.

      localhost usually stays localhost. Some hosts use a different DB server name, but it’s very rare.

      The usual table prefix is modx_, though it’s arbitrary. Using modx_ will correspond with most of the docs. If your config.inc.php doesn’t have a table prefix line, you can ignore it and it should get set during the install.

      You often have to create the DB and add a user with full rights to it before doing the MODx install (MODx tries to do it during the install, but many hosts won’t allow it). Note that many hosts add a prefix to the DB name and/or user name so watch for that when you create them. The DB name, DB user name, and DB user password are what you enter in the config.inc.php file.

      Note that they are not the same as the MODx user name and password you create during the install -- those are what you use to log in to the MODx Manager.


        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
        • 16654
        • 23 Posts
        Thanks for the reply - it’s very helpful. I think the config.inc.php file is under control. My last (hopefully) issue is dealing with paths for the File Manager Path, etc. This thing is fighting me all the way... Thanks again, Larry