We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4463
    • 26 Posts
    I’m developpeing a site at home using Xampp as framework, what do i have to do in order to place my site in another host when it’s done??
      • 25663 MODX Staff
      • 12,272 Posts
      It’s pretty straightforward.

      Once you’re happy with everything, install a fresh copy of MODx at your new location without the default content.

      Do a database backup of the DB on your development install using the Backup Manager tool. Use phpmyadmn to upload this database into your freshly installed site at your host.

      Replace the assets directory and copy the /manager/includes/config.inc.php to the new host.

      That’s it!
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Wouldn’t the new installation have taken care of creating the /manager/includes/config.inc.php file? In any case, just copying the file from your localhost to the remote site won’t work; the database configuration settings would need to be edited.

        You’ll also need to go back into the Adminsitration -> System Configuration form in Manager, in the Interface and Editor Settings tab, and fix the Resource path and Resource URL to your remote site’s path and URL, as well as the File Manager Path in the Miscellaneous Settings tab.

        If you’ve used full URLs for images in your content, or for including css or javascript files in your template, these will also need to be changed.
          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
          • 25663 MODX Staff
          • 12,272 Posts
          Good point Susan... I left that part out. You’re correct!
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 22303 MODX Staff
            • 10,725 Posts
            For a more detailed example, I’ll offer my slightly different approach to developing and deploying sites, using a typical scenario, which is developing on XAMPP locally (Win XP Pro) and deploying on a typical LAMP server environment:

            1. install site locally, usually involving an edit to the.htaccess to indicate the subdirectory I’m deploying my site into in the test environment, as in the following example where I have a local development copy of the MODx CMS site at /localhost/modxcms/:
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            
            # If your MODx installation is in a subdirectory, change the following line to match the physical
            # path to the "root" of the site as follows:
            # RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]
            
            RewriteRule ^(.*)$ /modxcms/index.php?q=$1 [L,QSA]


            2. after developing the site locally (using all relative paths from the site root, to keep it portable), I make a copy of .htaccess and call it .htaccess.local, editing the path on the .htaccess file for the remote deployment location as appropriate (usually removing the subdirectory path)

            3. I then make a copy of manager/includes/config.inc.php to config.local.inc.php, and edit config.inc.php with the remote database connection settings for the deployment server (assuming the remote db is setup and ready to use)

            4. I copy the /manager, /assets, /index.php, and /.htaccess files to the target LAMP server (you can optionally exclude *.local.*)

            5. Unless you are in an environment where the webserver runs as the same username with which file ownership is attributed on the target server, you’ll probably need to change permissions on the following directories/files to 777:

            • /assets/cache (and all files ending with .php in this directory)
            • /assets/images
            • /assets/files
            • /assets/flash
            • /assets/media

            6. dump the local DB contents and then execute the SQL dump in the target DB on the remote LAMP server (I use phpmyadmin for this typically)

            7. access the remote manager and change the paths for the resource browser (Resource Path and Resource URL in System Settings -> Interface & Editor Settings tab) and the filemanager (File Manager Path at System Settings -> Miscellaneous Settings tab)

            8. test the remote site

            That should be about it.
              • 25663 MODX Staff
              • 12,272 Posts
              Nice Jason... deserves to be in the developer docs.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 4463
                • 26 Posts
                Well done guys, these instructions will be very usefull for a lot of people wink
                  • 6726
                  • 7,075 Posts
                  Nice tutorial Jason laugh

                  I agree this one belongs in the docs, and I should take time to translate this someday...

                  Another thing I have come accross sometimes during those transfers are

                  1) Problems with passwords when using different MySQL versions (I am not sure but MySQL 4.1 and up uses PASSWORD, not MD5 anymore)

                  2) Problems with character encoding (also not sure in which versions it has changed but sometimes this caused me some trouble)
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l'outil id