Moving a Site
Moving a Concrete CMS Site
1. Database Copy
How to Obtain a Copy:
- Use phpMyAdmin "export" function. If you're unfamiliar, tutorials are available on YouTube.
- For SSH or terminal access:
bash
mysqldump -u db_user -p db_database > database.sql
2. Fetch the Files
Key Directories
- Crucial: Contains
application/
,concrete/
,updates
and more. - Ignored:
application/files/cache/
andupdates/
. - To create a site archive, copy the
public_html/
folder tocopied_site/
, remove unnecessary folders, and create an archive usingtar czfv site_copy.tgz copied_site/
.
3. Transfer the Files
Steps
- Upload and extract the archive to the new host, ensuring a similar file structure.
- Modify permissions for:
- application/files/
- packages/
- updates/
- application/config/
- sitemap.xml
- Ensure the correct version of Concrete CMS. Either download the appropriate version or use the version in the concrete/
folder.
4. Set Up the New Database
- Create an empty database on the new host.
- Import data using phpMyAdmin or the command:
bash mysql -u db_user -p database_name < old_database.sql
5. Modify the Configuration
Update Database Credentials
- Adjust the application/config/database.php
for your new database setup.
- Example configuration:
<?php
return array(
'default-connection' => 'concrete',
'connections' => array(
'concrete' => array(
'driver' => 'c5_pdo_mysql',
'server' => 'localhost',
'database' => 'mydatabase',
'username' => 'myusername',
'password' => 'mypassword',
'charset' => 'utf8'
)
)
);
Testing the Migration
After the migration, ensure: 1. Cache clearing from the dashboard works. 2. File uploads in the file manager are successful. 3. Automated Jobs / Tasks run correctly. 4. Page edits function without issues.
Troubleshooting
- Upload or Job Issues - Check file permissions.
- Database Connection Issues - Verify settings in
config/site.php
. - Broken Links - Confirm the
.htaccess
file is correct for your hosting environment.