Moving
How to move your CMS Made Simple installation to a new server (method 1)
It is a simple, four step process to move your installation from one server to another.
Step 1
Clear the Cache:
Login to admin, go to Site Admin/System Maintenance and clear the cache. This reduces the number of files you need to copy.
Step 2
Move the Database:
Using PhpMyAdmin, or any other database management software, create a backup/export of your CMSMS database. Use this backup/export to create/import a new database on the new server.
It's important that you leave out the option to "create database" if it is available, as it is unlikely that the destination database name will be he same as the source database name. However, you must ensure that the export file will "create tables".
Step 3
Copy the Files:
Using SSH, your host's control panel, or FTP, copy all of the files from your old site to your new site. Remember to check the permissions for the folders on the new site to ensure they are set correctly, i.e. all cache, uploads and any other folders or sub-folders that need to be writable, are writable.
- modules
- tmp
- tmp/templates_c
- tmp/cache
- uploads
- uploads/images
If using FTP remember to copy all files in "binary" mode. Do not enable auto-file type detection, or ASCII mode.
Step 4
Modify config.php:
In the config.php file on the destination host, find the Database Settings, Path Settings and Image Settings sections and update them with the paths and settings applicable to the new server.
Recent versions of CMSMS use a sparse configuration file. Many paths and URLs if not specified in the configuration file are auto calculated. This means that when moving a site you may only need to change the database connection settings in the config.php. If experiencing problems you can override the auto-calculation by specifying the values in the config.php. See the CMSMS_Config_Reference.pdf file that is included in the docs directory of every installation since CMSMS 1.10 for a reference of config variables and their function.
The path settings are not always that obvious. In your FTP-client it might show something like '/cmsmadesimple' but the real path on the server might be something like e.g.: '/home/content/n/e/e/username/html/cmsmadesimple'. If you have the wrong path, look at the error-message when you try to access your site, that will hint you to the real path settings.
It may be necessary to clear cache again...
How to move your CMSMS installation to a new server (method 2)
In this howto path to pages is /var/www/cmsmadesimple and username for the database is USER, password is PASS and database host is HOSTNAME. ssh is used to connect to servers and sftp to move files between.
Old server means the original and new server is the target server.
- clear the cache by clicking the "Clear" button in "Site Admin/System Maintenance" (and maybe set a site down message)
- ssh to old server
- create tar ball of the files (without tmp/) and database
mysqldump -u USERNAME -h HOSTNAME -p DATABASENAME > dump.sql
cd ..
tar -zcf backup.tar cmsmadesimple/*
copy tarball to new server
put backup.tar
close connection to old server (the old server still works like it used to as nothing has been modified there)
open connection to new server (the copied file most probably is in your $HOME so lets copy it to right place)
cd /var/www/
tar -zxf backup.tar
cd cmsmadesimple
mysql -u USERNAME -h HOSTNAME -p DATABASENAME < dump.sql
(after this you can delete dump.sql)
FAVORITEEDITOR config.php
- you need to change database settings and all paths (in this example paths are the same for both servers)
- verify the tmp/ and tmp/cache folders are empty, writeable and belong to the correct user.
- login to new server admin and clear cache and unset site down message