Hello guys,

I just moved my drupal files/folders from localhost to live server. I have also imported the database and made the connections in settings.php. However, pointing to my site home gives an HTTP 500 Internal Server error. The only pages i can access are:

www.missotown.com/contact
www.missotown.com/forum

Pls guys, is there anything am missing? What's the proper way to move drupal to a live server?

Thanks

Comments

neroflick’s picture

Waiting for help ...

VM’s picture

bumping your thread after 30 minutes isn't helpful.

did you clear all the cache tables in the database?

neroflick’s picture

sorry about the bumping ....

no i didn't, infact am just hearing that for the first time. could u pls outline the entire process step-wise? many thanks!

blueflowers’s picture

How to empty cache:

http://drupal.org/node/42055

VM’s picture

I don't know that I'd use the snippet used in that document. First off the document is deprecated second, there is more than one cache table in drupal 6.x which includes menu cache.

to clear your cache tables manually
use phpmyadmin or like tool
locate the tables and empty them.

Typically I do this before I export the database to be moved.

blueflowers’s picture

I stand corrected! Thanks VeryMisunderstood. The cache tables will look something like:

cache_tablename depending on your install and which modules you have also installed.

blueflowers’s picture

def clear your cache table as pointed out by VeryMisunderstood.

Also might be helpful to uncomment this line in your .htaccess file

RewriteBase /

neroflick’s picture

Thanks guys but if i get u right, all i need do is

1. Clear cache tables
2. Export db and then import on live server
3. Move files/folders to live server
4. Edit settings.php to reflect live server config

Are these all i need to do?

blueflowers’s picture

yes, that should do it. also, make sure php5 is running. You can do that by adding this line to your .htaccess file

AddType x-mapp-php5 .php

if for some reason at this point your homepage shows but no other pages, then do my suggestion of uncommenting this line in htaccess

RewriteBase /

neroflick’s picture

Guys, i've tried everything here but it didn't work. Could you guys pls lead me from the scratch without assuming anything as am a complete noob in drupal.

I got a drupal website running fine in localhost. I want to move it to a live server. How do i begin? Do i need to disable anything locally, disable any modules or stuffs like that. Pls guys .... be very detailed with and also forgive my ignorance.

Thanks y'all ...

blueflowers’s picture

I'm at a loss. Who is your hosting company? It may be a problem on that end. Are you able to do a fresh install of Drupal on your live server w/o a 500 error?

neroflick’s picture

I have a dedicated server at Rackspace on which i host several php scripts ...

I'd try the fresh install on live server and see how it goes ...

You still didn't outline the transfer procedure ... would really appreciate if u can.

916Designs’s picture

Beware of differences like your local site being in your htdocs folder and your live site being in htdocs/drupalsite. It does sound like your host's php config is off.

neroflick’s picture

Am a drupal noob but i aint new to installing php scripts. I come from a joomla background where there is concrete documentation for this sort of transfer. As regards my php config, its okay as i have other scripts running on my server.

All i need really now is the RIGHT procedure (outlined in the correct sequence without any assumptions) to transfer a drupal site from local site to live server.

Thanks for your support .... I really appreciate!!!

VM’s picture

I ...

put mysite in offline mode.
I clear all cache tables, the watchdog table, and the sessions table
I export the databse

I import the database to the new DB
I move the files
I open and adjust settings.php, $db_url to point to the new database and adjust mysqli or mysql to what it needs to be based on the version of PHP running.

I put the site back online

I navigate the site

I'm done.

neroflick’s picture

Got it right at last! Thanks for all the tips ... I really appreciate u guys.

ralexanderclark’s picture

Now that you got it and understand that it's difficult to get details outlined in basic form, do you mind outlining the process as you would have liked to see prior to starting this thread?

In a simple way that would be used as a checklist for people who are migrating local sites to being live for the 1ST time?

Many Thanks!!!!!

VM’s picture

you can follow the steps I outlined which really aren't much different than documentation and videocasts of how to do it.

ralexanderclark’s picture

Gottit! Thanx VM!!!

adityamenon’s picture

I can recite it by heart already, however, I've bookmarked this page for your reply VM. Coming back here every time when I need to move a drupal install, and scrupulously following every instruction carefully never fails! Thanks again :)

VM’s picture

you're welcome

meh’s picture

You're right ... there is a palpable lack of teaching 'empathy' within the Drupal community.

How can it be that there is not an architecturally-oriented published "How-to" document about this!

remy.damour’s picture

Hi, If you're on multi-site mode, you will also need to rename you subsites folders to match domain names.

(ex: /drupal/sites/site1.localhost should be renamed into /drupal/sites/site1.mydomain.com)

remy.damour’s picture

when setting up live a multi-site drupal installation, you might need to update 'filepath' column in 'files' db table too!
Otherwise documents/images might not show up and still point to localhost.

More info: http://www.qc4blog.com/?p=714

ralexanderclark’s picture

Many Thanx Remy!!!!!

isacar’s picture

How do I export the sql table and load sql data on the online server if my server does not have PHPmyAdmin?

itsmemohit’s picture

I would like to know this too. Subscribing.

Rob Carriere’s picture

That depends on the server and on your preferences. :-)

1. Install PHPmyAdmin. If you have FTP access to the server and you know a user/password for MySQL, you can install and configure PHPmyAdmin.

2. If you have shell access to the server, you can use the MySQL command line tools. Export by

mysqldump --opt -u USER -p DATABASE > 2010-07-01-21-22_DATABASE.sql

(Substitute the correct values for DATABASE and USER.) This command will prompt you for the password of USER.
Import as

mysql -u USER -p DATABASE < 2010-07-01-21-22_DATABASE.sql

This command will prompt you for the password of USER.
This assumes the database has already been created on the on-line server. If not, then see http://drupal.org/getting-started/6/install/create-database for details.

isacar’s picture

That's REALLY helpful, especially the link at the end with the command line MySQL commands. I don't think I'm in a position here where I can install PHPMyAdmin, so I'll try to just do it from the command line. Thanks!

jimzhou247’s picture

I documented how I did it step by step. Let me know if this is useful:
http://www.jimmyzhou.com/blog/moving-drupal-site-from-localhost-to-share...

isacar’s picture

That's a very helpful tutorial, one of the best I've seen. What we were asking for was a bit different as we need to do this without phpMyAdmin. But that's still very helpful thanks!

jimzhou247’s picture

I'm glad it helped!

tsatsos007’s picture

in the tutorial provided i see only half the steps...which are fine by the way!! ..but by clearing cache/watchdog/session tables....do u mean delete them from phpmyadmin??? ...can t i just choose all folders except those i mentioned to export since i m given the choice to select the tables to export?!?......

VM’s picture

no. clearing means empty not delete. You need the tables. you don't need the data in the tables.

tsatsos007’s picture

do i lose any of my work by clearing those tables??(i just delete the content within those tables at phpmyadmin, right?just scroll to every cache table and press EMPTY? there r like 15 cache starting tables!!!do i clear 1 by 1?it will take forever!)will i still be able to continue locally work...although i will put it live l8er?

And..what r some security tweeks..issues i need to watch before transferring to live??

btw, do i need the devel module for ease of doing that procedure?has anyone tried it?

(here is a nice link i found: http://drupal.org/node/17620)