Moving Site

    This tutorial is based on a typical scenario, which is developing locally (XAMPP on Win XP Pro) and deploying on a typical remote (LAMP-Linux Apache MySQL PHP) server environment.

    The same steps will work for any source server with little or no modification, unless to the .htaccess file or the method of accessing your database.

    1. Install the site locally, renaming and editing the .htaccess file to indicate the subdirectory you are deploying your site into in the test environment, as in the following example with a local development copy of the Evo CMS site at /localhost/sitecms/:

      1
      2
      3
      4
      5
      6
      7
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      # If your Evo 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 ^(.*)$ /Evo/index.php?q=$1 [L,QSA]

      Rename the ht.access file in the /manager folder to .htaccess. This will turn off the RewriteEngine for that folder.

    2. After developing the site locally (using all relative paths from the site root, to keep it portable), 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). The .htaccess file in /manager should be left as it is.

    3. Then make a copy of manager/includes/config.inc.php as config.local.inc.php, and edit config.inc.php with the remote database connection settings for the deployment server (the remote db must be already created and ready to use)

    4. Copy the /manager, /assets, /index.php, and /.htaccess folders and files to the target LAMP server (you can optionally exclude *.local.*). If this is an upgrade and not a new installation, make sure to save your remote site's /assets folder first, then you can re-upload all of your existing content, such as images and templates, if the upload has overwritten any of it.

    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 will 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 (export) the local DB contents (use the Backup Manager, or any MySQL client such as phpMyAdmin). In phpMyAdmin, select SQL for the file type. Save to a file on your local machine and note the location. You will probably want to empty any log tables before backing them up, or else you'll have rows and rows of log data useless to your new server.Then go to the remote server and import the SQL dump you saved. In PhPMyAdmin, select the database and "import" the SQL file.

    7. Point your browser at "http://domain_of_your_new_site.com/manager". After logging in, go to Adminstration -> System configuration 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. If you can't access the admin interface, you may have the wrong database settings in "manager/includes/config.inc.php". Try correcting them on the local machine and uploading the file again. If you still can't access the admin interface, try going to "http://domain_of_your_site.com/install" and doing a "custom install". There you can try different database settings and test them until you get a connection. As long as you haven't hacked any of the Evo code on the local machine, you can finish the install. Alternately, you can put the correct settings (now that you know them) in "manager/includes/config.inc.php" and upload it.

    9. Test the remote site. It should be working just the same as your local development site.

    10. If things still aren't right, try doing an upgrade install on the new site.