Relocating a C5 site
I'm getting this error message...
[Unable to connect to database.
A database error occurred while processing this request.
Catchable fatal error: Argument 1 passed to ConfigStore::__construct() must be an instance of Database, null given, called in /home/pranzare/public_html/CoCoMR/concrete/models/config.php on line 48 and defined in /home/pranzare/public_html/CoCoMR/concrete/models/config.php on line 136]
I updated the site.php file with the new location of the database and other parameters. Is this a sign the database is not working, or something else?
i experience this error before, it c'uz the DB_SERVER not localhost
especially so in cpanel
hope this helps
If so, which content needs to move over on a clean install?
If you have access to something like cPanel that allows you to zip up folders on your website, you really can do a migration in a matter of minutes (ignoring the time it takes to upload/download).
I know there are some decent guides out there how to do this, but briefly I would suggest these steps:
On the old server
- Turn off the cache and clear it
- Download a copy of the entire site. You could possibly zip this up in one go to download using the File Manager in cPanel, much quicker than ftp-ing all the files. Make sure you include the .htaccess file.
- Export a copy (a 'dump') of your database using something like phpMyAdmin
On the new server:
- Create a new database and database user that can access the new database, import the database dump you exported.
- Upload all of the site files (if zipped up, just upload this and expand the zip in the file manager)
- Edit the /config/site.php file to reflect the new database name, user and password. Edit this also to reflect the correct base url (since it will probably be a temporary url initially)
- Test that things work, log into the new site and turn the cache back on if required
I find that the trickiest part of migrating sites isn't the site bit itself, it's managing the migration of email accounts!