Developing Offline, Moving Online - Is There a Way to Avoid Catastrophe?

Sarvasri's picture

I recently set up a local development environment on my computer with the idea that it would be better to develop offline. Faster, no exposure to the outside, develop even when away from the internet. It seemed like a good idea.

When I tried to move my newly developed web site to the host provider. Everything broke.

I had created a new database on the host with PHPMyAdmin and imported the data from my local MYSQL. I changed the site.php and settings.php to match. But it still broke.

It seems that Drupal hardcodes calls to the database in it's internal core code and when you change database names those hard codings break the site.

The host technicians at my provider referenced this document:

https://drupal.org/node/776864

Looking into this document made me realize how extremely problematic it is to move a site.
Certainly, there must be a BETTER WAY.

HOW DO YOU MOVE A SITE ???

Do you know of a way to move a Drupal site to a host without creating a catastrophe?

Comments

"Backup abd Migrate" module

Katrina B's picture

Are you using the Backup and Migrate module? https://drupal.org/project/backup_migrate

I've used this module many times; I can't recall ever having a problem with it.

Katrina
Site builder, writer, trainer, graphic designer

I used PHPMyAdmin

Sarvasri's picture

I used the Acquia development stack to do the development, but I used a standard Drupal install instead of their Drupal stack. In their devel system, there is a PHPMyAdmin. I used that to export the database. The Acquia export function built into their development stack broke. It said it couldn't export the site because a Drush command failed. After I exported the database using PHPMyAdmin, I had the SQL file. At my provider (cpanel system) I used their PHPMyAdmin to create and import the database.

Does the Backup and Migrate module export a different SQL database that might work better? I looked at the module and it appears to "backup" the database by exporting it, but I didn't find any Migrate functions in the module. Am I missing something?

"Backup abd Migrate" module

Katrina B's picture

With the module (installed on the dev site and the "live" site), use the "backup" tab to make a copy of the database on the "dev" site. Then go to the "live" site and use the "restore" tab to upload the "backup" file. It's been a while since I've used "Backup and Migrate" ... but I think that method will work.

Katrina
Site builder, writer, trainer, graphic designer

This was actually a much better idea than I thought!

Sarvasri's picture

It turns out that by using the Backup and Migrate module, certain fixes are applied that don't happen when you use PHPMyAdmin. I thought that the SQL file was the same no matter how it got put into the system, but that is not true.

By using the Restore command inside the module, various settings are preserved on the site that you are using and don't inherent the settings from the site you are uploading from.

Many thanks to Katrina. She saved the day and I was able to get the site up.
Of course it still needs a lot of expansion, but that will come.

Thanks Katrina!

triadDUG

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: