We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9747
    • 34 Posts
    Is there a better version of the instructions for moving a MODx site out there? I’ve been trying to follow the WIKI and have failed about three times. Blank screen when I click login after the upgrade/install screen.

    I am pretty sure that some of these steps are out of sequence. (frustrating for someone who follows instructions to the letter for unfamiliar territory.) Also, some steps, such as naming an .htaccess file locally are not allowed in my local environment. AND.... the instructions appear to be a hybrid of REVO and EVO.

    developing locally on OSX in MAMP

    Preparing to start over.... Again ...really frustrating

    Wouldn’t it be easier if one could just do a blank install on the remote, then replace the remote db and assets?


    huh


      • 7914
      • 137 Posts
      Here are the steps I take to move a site through local, dev and production environments. This works well for me, if anyone sees I am creating trouble for myself please chime in.

      I DL a copy of MODx from modxcms.com and run the setup.

      I make a copy of the ht.access file and rename it .htaccess. You will need to do this inside of your editor of choice as the mac OS will yell at you/hide anything that starts with a "." in front of it. (I am working from mac/MAMP also) This is so if/when you enable the friendly url’s they will work.

      I modify the "/core/config/config.inc.php" file to use a switch based on what environment I am in:
      switch(getenv('HTTP_HOST'))
      {
      	// LOCAL Environment
      	case 'local.mysite.com':
                  // all of the config stuff goes here
              break;
      
              // DEV Environment
      	case 'http://dev.mysite.com':
                  // all of the config stuff goes here
              break;
      
      	default:
                  // all of the config stuff goes here
              break;
      }
      

      I also do this for "/config.core.php" (in the root).

      I do this so I don’t have to have multiple versions of the config file. Mainly I do it because all of our code gets checked into a repository. If for any reason these two files get altered they will work in all environments. It creates a bigger file but it’s kind of a fail-safe for me.

      Once I have my site working developed and working locally, I clear the site cache, dump my db and zip up all of the local physical files.

      I then create my site on my host and create a database. Also, I upload the zip file (of the whole site) to my host.

      Then I import my database to my dev site. I have my host company unzip the site for me and at that point, I am usually able to access the manager. You could upload the "setup" directory and run that again if you like - it will overwrite the switch, but at this point you won’t really need it anyway.

      Just as the instructions say, you will need to clear the cache on the site. You will most likely see an error when you first log in. Once the cache is clear log out and log back in. Everything should be there.

      Hope this helps!
        • 9747
        • 34 Posts
        Ready to give up:


        Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 40 bytes) in /home/earth26/public_html/lent45/core/model/smarty/sysplugins/smarty_internal_templateparser.php on line 1873

        error message after login