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!