Community & Support

Unsuccessful migration from one server to a new server

I've read both the manual and posts here, and these are the steps I followed to migrate my site over to a new host (Hostgator).

1. Used Backup and Migrate module, Backup/Export DB tab to download a Gzip of my database onto my desktop.

2. Went to working site's "Sites" folder, compressed and downloaded to desktop.

3. Installed Drupal in root directory on new Host server using Fantastico.

4. Installed/enabled Backup and Migrate module on new site, added new role "admin" and set permissions.

5. Went to Restore/Import Databse from the Backp and Migrate module on new host, browsed to the sql.gz backup file on my desktop, uploaded, clicked "Backup Database".

6. Went to Cpanel of new host and uploaded compressed "Sites" folder, extracted, and compared. Everything appears to be there, except .htaccess, so I download that by itself from old site and upload to new, same spot. It doesn't show though (?).

When I go to the new site, it looks wrong, the theme is gone. I login and the theme comes back, except there are things missing, like my left side navigation. In addition, there are some error messages I don't understand:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'imce_access' was given in /home/shannonm/public_html/includes/menu.inc on line 452.
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'views_access' was given in /home/shannonm/public_html/includes/menu.inc on line 452.

There are however, signs that my database is intact, as the pdf's and such are there.

I repeated this whole process and got the same result.

Anyone know what's going on here?

I'm on Drupal 6.10 (will upgrade to 11, but one thing at a time)
Server Info:
Apache 2.2.11 (Unix)
PHP 5.2.9
MySQL 5.1.30
OS: Linux

Comments

not sure, but...

i'd suspect either stale data in the cache (go to admin/settings/performance and clear cache to fix this), or that some modules aren't getting found by the new site (go to admin/build/modules on both sites and make sure everything matches up).

Your migration becomes

Your migration becomes somehow complicated because of two factors.
- The use of Fantastico, which may do some things differently from standard Drupal, and only the Fantastico people know exactly which things (I remember that they didn't supply an update.php file -- not sure if this is still the case).
- Possibly the use of the Backup and Migrate module, for which it may be easier to get help in its project's issues queue.

A few things that I can say:
- Keep your initial backup safe until the problems are fixed.

- The .htaccess file (actually all filenames beginning with a dot) is considered a "hidden" file. Most FTP programs have a configuration option to show them.

- Is there any path change involved in your URL or in the location under public_html where Drupal is? Did you have a $base_url specified in your settings.php file? (normally you shouldn't have to). Did you have any RewriteBase set in your .htaccess file?

- Does your admin/reports/status page complain about anything?
Does your admin/settings/file-system page consider its settings acceptable (does it allow you to to save it?)

- Is the theme which you were using present, at the same relative location as before?

- Visit the admin/build/modules page and let it load. Does this fix any of your theme problems? Do you see the IMCE and Views modules listed, and are they enabled?

- Visit the admin/build/themes page. Is your current theme (and your admin theme if you have one) enabled? (the square checkbox).

- Visit the admin/build/block page, select the tab of your current theme on the top, and check if the blocks which disappeared from your left sidebar are enabled. What blocks are they?

Problem worsens...

After shutting down my computer and rebooting, I went back to the new website to check on the suggestions you sent, except that the left-side column navigation is not there, so I can't log in (or click on Administer for that matter)! I decided to uninstall Drupal from the new host, and install it manually. Now I get this error message at the create database stage:

Warning: fopen(./sites/default/default.settings.php) [function.fopen]: failed to open stream: No such file or directory in /home/shannonm/public_html/Communications/includes/install.inc on line 188

Warning: Cannot modify header information - headers already sent by (output started at /home/shannonm/public_html/Communications/includes/install.inc:188) in /home/shannonm/public_html/Communications/includes/install.inc on line 618

Warning: Cannot modify header information - headers already sent by (output started at /home/shannonm/public_html/Communications/includes/install.inc:188) in /home/shannonm/public_html/Communications/includes/install.inc on line 619

It initially told me to copy /sites/default/default.settings.php to /sites/default/settings.php, so I changed the name of default.settings.php to settings.php since it was already in the same place. Did I do this incorrectly?

Stuck again. I can't believe all this is over me transferring my running site to a "Drupal-friendly" host. It seems like it's harder than it should be.

To answer your questions:
My original (working) website was located under a subdirectory on the first host. When I found a new host, I installed Drupal at the root directory, so the URL goes directly to it without there being a /subdirectoryname.com

I didn't change anything in my settings.php or .htaccess files, unless there's something in Drupal that changes them for me. I've left those alone since the initial install.

I can't visit any of the areas you suggested because of the navigation not being there.

I did get the hidden files to show (thank you).

Any ideas?

This error message is easy.

This error message is easy. You shouldn't rename default.settings.php, you should copy it (this is a known problem). Upload a fresh default.settings.php file.

The fact that you were in a subdirectory and moved to the root can cause some problems with broken file links in the content which will need fixing, but no serious problems for the general operation of the site.

Remember that you can always go to http://yoursite.com/?q=user to login.

Also, you may need to get a new backup from the old site after you
- Disable clean URLs in admin/settings/clean-urls
- Switch your theme to Garland
- Clear the cache in admin/settings/performance
- Take a new backup of the site with these settings.

These are standard precautions for known difficulties caused by differences between hosts, and you can change everything back later.

Backup and migrate

I migrated a local site to a free web host and the homepage shows up just fine but anything linked from there is broken. Any ideas why this would happen?

What are the broken links

What are the broken links like?

If http://example.com/user is broken
but http://example.com/?q=user works,

then clean URLs don't work on the new server. To try to make them work, make sure that:
- drupal's .htaccess file exists in drupal's main directory
- your new server supports the use of .htaccess files (AllowOverride All)
- your new server has mod_rewrite enabled.

If you can't enable clean URLs in the new server, then go to http://example.com/?q=admin/settings/clean-urls and disable them, so that drupal doesn't try to use them in the menu links.

ahha

so that was it! now i can research it with the host. thanks for the help.