Welcome to the official CMS Made Simple documentation pages. We make a continuous effort to keep the information here up to date! However, dear user, we highly value your assistance in the process.
We need your assistance to make the documentation accurate, user friendly and understandable. Therefore we welcome any tips or suggestions regarding documentation. Thank you in advance for your contribution.
However, we will not respond to technical support questions submitted using this form. If you are having difficulty with CMSMS and cannot find the solution on this website, please submit your question appropriately on our support forum at: http://forum.cmsmadesimple.org. Please remember to follow the forum rules when posting.
How to move your CMSms installation to a new server (1)
It is a simple, four step process to move your installation from one server to another.
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.
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".
Copy the Files:
Using SSH, 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 writeable, are writeable.
If using FTP remember to copy all files in "binary" mode. Do not enable auto-file type detection, or ASCII mode.
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.
How to move your CMSMS installation to a new server (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
- cd /var/www/cmsmadesimple
- mysqldump -u USERNAME -h HOSTNAME -p DATABASENAME > dump.sql
- cd ..
- tar -zcf backup.tar cmsmadesimple/*
copy tarball to new server
- sftp USER@NEWSERVER
- 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)
- cp backup.tar /var/www/
- 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)
- 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