Moving a Drupal Site to Mosso
“ ”
Navigation
There are a lot of blog postings about moving a drupal site. I find them a little general. So here is my version, specific to the Mosso Cloud. While there are a lot of moving parts in a drupal setup, the are a limited number of things you need to do.
1. Export Database into a .sql file.
There are a number of ways to export your database. If you have access to PHPmyAdmin, then you can use the 'Export' Option. Remember to select the export options for 'Add DROP TABLE / VIEW / PROCEDURE / FUNCTION'. This will enable the sql to drop an existing table if it already exists. If you choose this option, make use you want the old tables dropped.
Depending upon your version of PhpMyAdmin, the file will be exported to your browsers as a .sql file. You will want to edit this file comment out the first few lines that want to drop or create the database. On Mosso, you need to create the DB using the manage.mosso.com control panel. So do not use the 'drop database'. And since the database name on Mosso will be specific to your account, you can remove the 'use yourdbname' command.
2. Import Database in to new server.
The last step is to load the .sql file into the mysql database. If you want to use the PHPmyAdmin, use the import option. If you are using Navicat, then right click on the database name and choose the 'Execute Batch File...'. This will then import the .sql file. This can take a while if you have a lot of content and are on a slow connection, as each insert command is executed individually.
I found that the Navicat Synch data feature does not like the db structure of some drupal tables. 'Images' specifically. Typically the data synch option will only work for tables with defined primary keys. There may be a work around, but with the options why fight it.
Note: The Mosso cloud has a lot of database hosts. These hosts are important when you update the settings.php file. When connecting form the outside, you need to use the external IP. So check the host name in on the database settings page within your control panel.
3. Edit /Sites/Default/Setting.php file.
Once your database is in place, you need to edit the Settings.php file. Open the mosso control panel and find the database settings for your site. When connecting from outside the cloud, you have to use the IP address. But when connecting from inside, use the host name. Mosso has grown so much this last year, the naming convention for host names are not uniform.
Also the link that Mosso provides from the control panel to their PhpMyAdmin tool does not include the hostname, so you will need to select it from the host name pick list on the login page. Hint to Mosso, this would be a really nice fix, just pass the hostname in the URL and have the login page default correctly. The Control panel is a little slow and I have had to do back and retrace my steps to find the specific hostname.
4. Edit the .htaccess file.
Lastly, check your .htaccess file. Different servers require different settings. On the Mosso cloud, the file needs to have a few of the commented settings, un-commented. This option will need to be enable in order to get clean URLs enabled. Drupal will not tell you why, it will just disable the option to turn it on.
RewriteBase /web/content
A working .htaccess file is attached.
- SSmith's blog
- Login to post comments



