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.