Hi there,

I have developed a new (and also my first) Drupal site locally on my mac.
It runs fine locally, including CSS, and a few days ago I wanted to create a test site online.
the host is Bluehost, which seems to have all the requirements to run a Drupal driven site.

I have been looking around on the forums and found some helpful info on how to migrate this from local server to online server.
however, I just can't seem to get it up and running.

this is the steps I have taken so far (various times, but no satisfactory result).

1) I have done a clean Acquia-Drupal install in public_html/subdomain/ (so i have copied the whole Acquia-Drupal folder in here)

2) i go to my phpadmin in Bluehost and create a new mySQL database. Bluehost always adds the client name before the new database name, so in this case it would be client_newdatabase. I then add the admin user to the mySQL database.
so now I have an empty new database and an admin user attached with all privileges granted.

(If I now would go to subdomain.website.net/install.php, the installation process runs smoothly and it let me create a new username etc.
this tells me Drupal is installed properly and lets me login to the admin section to start building a new site. But obviously i dont want to create my new site from scratch, since its already on my machine locally.

3) i then go to my local phpadmin and export the mySQL database of the site I have developed so far. the database is exported as acquia_drupal.sql

4) I use bbEDit to open up the acquia_drupal.sql -> in here I change the name of the database from 'acquia_drupal' to client_newdatabase (as created in point 2). I save and also rename the file to client_newdatabase.sql

5) I use the Bluehost phpAdmin to import the client_newdatabase.sql by selecting the empty database and using the import function. this takes a while but is completed succesfully without any errors.

6) i then use my ftp app to transfer all the required modules from my local folder to the online folder.
I also copy the custom made theme including all necessary CSS files.
I also copy the sites/all and sites/default folders (the latter including all the files from the local site)

6) I open up the local sites/default/settings.php and change the $db_url = 'mysqli://drupaluser@127.0.0.1:33066/acquia_drupal' to $db_url = 'mysqli://adminuser:password@localhost/client_newdatabase' (the l/p correspond with the Bluehost mySQL user that is attached to the new database).

when i now go to the online site, the new website loads the frontpage. Header and frontpage load, but the CSS doesn't appear.
also, none of the links on the menu bar work. I get a 404 page not found error. I can't login to the admin section either.

I really dont understand what I am doing wrong.
any help would be much appreciated!

Comments

cog.rusty’s picture

(By the way, step 4 shouldn't be necessary, only comments contain the database name in there)

The first thing to check is clean URLs. Check if the page "?q=user" works but the page "/user" doesn't. If you have been using clean URLs (without ?q=) in the local server, the remote server may not be ready to support them yet, and you may need to disable them in "?q=admin/settings/clean-urls" until you fix them.

About the broken css, have you placed your themes at exactly the same paths relative to Drupal as before? Hover over the links or check the html source of a page in your browser and see if you notice anything unexpected about the paths or the domain name.

Also try running update.php and go through all the steps, to clear the cache and rebuild the menus.

SVilas’s picture

thanks a lot for the quick reply, cog.rusty

indeed, "?q=user" works but the page "/user" doesn't.
I was able to set an admin login using "?q=user"
I checked the admin/settings/clean-urls and it mentioned that my server doesn't support them. so they're now disabled.

I now assume that the css is not found because of the clean URL usage?

how do i go on and fix this problem?
would it work by running update.php as you mentioned?

once again, thanks for the help. it seems like a step in the right direction after hours of mucking about !

cog.rusty’s picture

The theme's css shouldn't be affected by the clean URLs change, if it has been written properly. Only image links posted in the content might be affected.

Try visiting the admin/build/modules and admin/build/themes pages (just watch the loading) to update your paths.

If this does not help, look at the html source of your page in your browser and check the css paths in it. What are they? Do they point to the right place for your css files?

Running update.php is always a good way to clean up things.

Anthony Pero’s picture

By the way, you can get clean URLs working on Bluehost, which is what you should do. It will require making a change to your .htaccess file, and the instructions can be found here: http://drupal.org/getting-started/clean-urls

This will take care of most of your problems.

Tony

Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/

SVilas’s picture

you were right. there was an override line in the style.css which screwed up the paths.
also, there was some uppercase and lowercase issues with the names of image files, which worked fine locally, but were apparently an issue online.

everything seems to work fine now (at least the css is ok :) )
some other technical glitches, but should be fine.

thanks so much for your help!

SVilas’s picture

What I also noticed is that when logging into the ?q=user page
a number of the following errors are being reported (they are all the same):

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

I am not sure if this is also related to the Clean URL issue

cog.rusty’s picture

No, it is not related. Do you have the notifications module installed and enabled?

SVilas’s picture

seems like one module didnt make it online! thanks!

dougl’s picture

In your step #1, do you upload the Acquia Drupal folders from 'Program Files' ,(my Acquia Drupal Install location), AND the Acquia-Drupal folder that is placed in my user/my-username/sites/ folder?

I am also a newbie preparing to migrate my localhost site to my web server and would like to be prepared as a 'newbie' can be.

SVilas’s picture

The Acquia Drupal folder in your 'Program Files' are emulating the webserver and used for your localhost site. there's no need to upload these to the web server since your provider will have mysql installed, etc.
The A-Drupal in /sites is what you want to copy.

sorry for the late reply, I guess you've figured out by now, but in case you haven't then i hope this helps.

dougl’s picture

thanks, I did figure it out but appreciate the response.

tansylam’s picture

I want to test the drupal site - drupalsite on my hosting server before uploading it to my client hosting server. I am using Acquia Drupal stack on my laptop.

I have a hosting account on hostmonster.com - www.mysite.com
hostmonster.com comes with Drupal install through SimpleScript. I created a sub-domain Drupal site with SimpleScript: www.mysite.com/drupalsite

Using Backup and Migration Module, I created a SQL file of the drupalsite on my local machine. Then with the tools given by hostmonster, I created an empty database called mysite_drupalsite and imported the SQL file created from my local machine. I can see all the files in mysite_drupalsite and there were no error.

Then I uploaded my entire C:\Users\user name\Sites\acquia-drupal\sites folder from my localhost and replaced the (already install drupal folder from SimpleScript) www/drupalsite/sites folder. In the drupalsite folder is all the default file for Drupal 6.9.
I checked the setting.php file and the database is linked correctly and I included the $base_url = www.mysite.com/drupalsite

However, I couldn't see the created site on the web host. In www.mysite.com/drupalsite is still the default drupal page when first install. All the additional module is there, but nothing is enable and everything I created is not here. I also disabled the clean URL in the Drupal Admin page.

What else do I miss??? Why I still couldn't see the site I created on the localhost.

Please help...

Tansy