what's the best way to pick up and move your whole site to a different web host, keeping all the data as is?

THanks,
Jwax

Comments

The crucial step is the database itself. Don't forget the files directory if you have a series of files you have uploaded via "attach" or FTP.

Anyway, a rough sketch (as this process can be accomplished in a variety of ways) but here are my two cents:

Process #1:

1. Export your database from the current host.
2. FTP download your Drupal directory.
3. FTP upload your Drupal directory to the new host.
4. Import your database data.

Process #2:

1. Export your database from the current host.
2. Import your database data.
3. FTP the files directory from the old host to the new.

If you have a domain, this will need to be done too - but to test a new host, you can always do a temporary domain to test the new location first.

Unfortunately, web hosts tend to do things differently from one to the other. Some allow for auto-installs of Drupal while some don't offer any CMS help at all. If you feel comfortable doing it all yourself, then you shouldn't have too much of a problem moving from one to the other.

If you are not comfortable getting into the nitty gritty of Drupal, you might consider contracting out the move.

---
Shane Birley
Vicious Bunny Creative
http://www.vbcreative.com

---
Shane Birley
Left Right Minds
http://www.leftrightminds.com

I guess this is my biggest question... how do you export, then import an entire database with all the tables and all the data?

Yes, I'm sort of a beginner at these things ;)

-Jwax

-Jwax

The easiest way is to dump the entire structure and data out as SQL using phpMyAdmin.

Does the host the database is on and the host the database will be imported to support PHPMyAdmin.

This is why it is a difficult question - hosts are all over the place in their support and functionality.

Might I ask what host your are leaving and what the new host is?

-
Shane Birley
Vicious Bunny Creative
http://www.vbcreative.com

---
Shane Birley
Left Right Minds
http://www.leftrightminds.com

Most modern web hosts have a control panel of some sort for interacting with the database server without customer support intervention. (If yours doesn't, find a new host.)

Simply perform a SQL dump of the database structure and data and execute it on the new server.

That still doesn't solve his problem. He is trying to export a database with very little knowledge of how to do so. So, simply telling someone to "change hosts" doesn't help to solve the problem.

-
Shane Birley
Vicious Bunny Creative
http://www.vbcreative.com

---
Shane Birley
Left Right Minds
http://www.leftrightminds.com

I'm trying to help him and so are you. I didn't mean for this to become a debate.

I understand that this can still be a daunting task for a beginner. I was simply suggesting that most likely his old and new web hosts have a control panel (which often includes phpMyAdmin) to make exporting/importing databases a relative breeze (versus using MySQL's admin CLI.) If not, he will probably need or be required to solicit help from the web host's tech support. (Some web hosts are not as sophisticated and/or secure and like to know firsthand what's being installed on their servers.)

Best,

------
Felix web Creations | Think Happy!
Forward Therapy : Solution-focused Hypnotherapy Northampton

Without searching how to do this I've just gone through a similar process, yesterday/day before. While moving from my development machine (windows) to my hosted site.

There were naturally a couple of problems especially as my host has a much older version of mysql 3.23.x.x . I had to remove all engine=InnoDB from the dumped sql and also the charset options.

Secondly as the temp director was set to a windows default. I needed to change this to something more fitting for a Red Hat based host. This was done after logging in as an administrator and going to settings - general settings.

No doubt there will be some other problems but still this seems to be working correctly.

As another comment it may be usefull to zip or tar your entire folder containing drupal. This also allows you to quickly move any extra files/ modules that you may have uploaded/reviewed.

last comment. If you don't have access to a web based tool for mysql then knowing the command options for mysql dump can be very useful, provide of course you have access to a command prompt on your hosting.

These can be very usefull although I find a little hard to follow :(
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
http://dev.mysql.com/doc/refman/4.1/en/mysqldump.html

Mysqldump is very handy, I do one every time I'm about to add a new module or make some significant change. It has saved my ass many times. If you have SSH or Telnet access to the machine(s), you can do it from the command prompt:

TO EXPORT DB TO A FILE:

mysqldump --add-drop-table -p DATABASENAME --user=DATABASEUSER --password=DATABASEPASSWORD > /FULL/PATH/TO/ROOT/MYBACKUP.SQL

TO IMPORT DB FROM A FILE:

mysql --user=DATABASEUSER --password=DATABASEPASSWORD DATABASENAME < /FULL/PATH/TO/ROOT/MYBACKUP.SQL

Replace the uppercase words with your own values.

-------------------------------------------
Interactive Worlds and Immersive Obsessions
http://www.asifproductions.com

-------------------------------------------
Interactive Worlds and Immersive Obsessions
http://www.asifproductions.com

No one has mentioned postgresql here, how do you export your postgresql database, tried it after reading the pg_dump manual online, but running the dumped sql file in my host with phpPgAdmin always gives errors, complaining about syntax error near "OWNER", here is what I did at the command line:

pg_dump -s -O dbname > C:\dbname.sql

I even tried a GUI tool like navicat premium, tried using the schema synchronization and data synchronization features, and they both failed, so I am wondering how to move my drupal postgresql database to live site.

Kind Regards
Proudly Nigerian

I know this is old, but I'll give a hint anyway in case other people needs help with this.

According to what you say, the dump is fine. You just need to create the user first.
If you open the .sql file with any text editor you should be able to see sentences like:
ALTER TABLE 'table1' OWNER TO 'user';
You need to create that 'user' first. Failing to do so, PostgreSQL will fail to set that user as the owner of the objects.

I had problems with this method - I would get SQL errors when interacting with the site after moving it, along the lines of "user error: Duplicate entry '0' for key 1". For some reason, auto_increment wasn't being set properly. Setting it on the affected tables seems to have made the problems going away.

Did I do something wrong when exporting via phpMyAdmin? I certainly had the "Add AUTO_INCREMENT value" box checked.

Okay movers, here's my scenario: I needed to move from source.mysite.com to target.mysite.com. Following previous comments from this thread, I turned off Clean URLs, TARed my files (everything in public_html/source), emptied DB cache tables (via phpMyAdmin), exported the DB (again, via phpMyAdmin, using all defaults except adding DropTable/DropView).

Since I have Fantastico, I installed a new instance of Drupal at target.mysite.com.

Then, I then I extracted my TAR files to public_html/target, and imported the DB.

Everything seems to be working fine... except under Administer>Site Information, the Default Front Page still says http://source.mysite.com/ instead of http://target.mysite.com/. As a result, I keep getting sent back to the source.mysite.com front page instead of the target.mysite.com front page.

A global search of the DB does not show any entries for 'http://source.mysite.com/' (okay, maybe a few, but they were in nodes and dont' really matter). Where does Drupal store the Default Front Page domain data? How can I change this?

As always, your ideas are appreciated :-)

Nevermind, found the problem...

Base URL and DB connection information is in settings.php. Changed those and everything is okay!

I keep reading that for new installs of 5.x, one shouldn't change the db_url because the install.php script does its thing with that. Is this also true when moving to a new host? (I'm moving from a development environment on my desktop.) Does one need to run the install script when moving 5.x?

Just change the appropriate configs in settings.php and you should be good to go.

Ive moved an install from iis6 server 2003 to iis7 server 2008!
moved db and the site runs but cant login, any login attempt just sends to front page once you press login ?

a fresh install works fine, its when i dump an old db from server x onto server y?

any ideas i cant find any likely variables in the database?

Probably : Old site thinks you have clean URLs, but you don't
See the troubleshooting FAQ

When moving a Drupal website from one host to another, do not forget to take a note of the activated modules, since after setting up your site on a new place and running update.php naturally only the modules existing on a new host will be activated and the state of rest of the modules, which you were using on the old host, will be set in database to off. This could create lot's of troubles in case you used many custom and contributed modules. The differences between versions of the modules used on old and new host also could cause lot's of issues.


---
Need reliable Drupal hosting with Apache Solr Search and more? Consider http://drupion.com!

Two other important points to keep in mind:

1) Turn off Clean URLs before backing up your database. I've sometimes run into trouble on a new host with clean URLs, and it's much easier to fix if you have a working system without them. You can turn them back on once you're on the new site, and if there are any issues it will let you know rather than breaking, so that you can fix them.

2) Flush your cache. Delete everything in the "cache" table, either before restoring the database dump or after but before doing anything with the new site. A lot of data is cached there that may confuse the system if it's moved locations. (phpMyAdmin has an "Empty" command, or the SQL would be "DELETE FROM cache;") Don't worry, the system will rebuild whatever cache it needs properly.

I've found those to be the biggest catches in the past. Also, remember that you may need to change the file persmissions on your files directory on the new site.

Cheers.

--
Larry Garfield
http://www.garfieldtech.com/blog

EDITED TO ADD: Apparently I was THIS CLOSE to finding the answer on my own :) I found it here: http://drupal.org/node/5590, for anyone else having this problem.

------------------

Hey Larry,

I saw you responded to this and thought you might be able to help me with a similar problem. I did not change domains or directory structure, but I did change servers. Everything SEEMS fine with the new install, I flushed my cache and never had Clean URLS turned on and the main page loads. However, If I try to log in, view a recent post or interact with the site in any way, I get 404 errors like this one:

"Not Found

The requested URL /drupal/node/9 was not found on this server."

.. which, looks to me, in my wopping 3 days of experience with Drupal, like it may be a clean url?

Hoping you can help!
-nee

Thanks,

Best tip ever. I was wondering why my images still had links to the wrong directory after I moved the site to the root. Stupid me, I expected Drupal to be kind to me. So after I switched off cache, I wouldn't dream of seeing such a big fat table in MySQL...

This would probably also explain a lot of other strange things I was experiencing on my site!

Thank again!

Hi,

I did not turn off clean URLs before migrating my drupal site from my local computer to the hosting provider. And now none of my links are working... I am getting 404s.. Any suggestions on how I can debug this. PLEASE HELP!!!!

My website is http://02f500f.netsolhost.com/drupal/.

Thanks!

Dan,

Thanks a lot for sending the link to unset clean URLs. That did the trick. I was able to click on the login link. But when I tried to login, I got the following error:

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 40961 bytes) in /data/21/2/8/108/2008760/user/2197523/htdocs/drupal/includes/theme.inc on line 1019

And now the whole site is locked up :(
Any pointers will be greatly appreciated.

Thanks!

Dan,

You are the da man! I found another link from you which helped me solve the issue:

http://drupal.org/node/76156

Thanks a bunch!!

Thanks!

I followed the process in the link you referred to and it works which is great. But what if after disabling clean URLs I want to enable cleanurls again? I can't seem to do that.

I am currently moving my site www.wearecion.org to a new host .

I get a page not found error

I have flushed the cache

and turned of clean urls before backing up the database and transporting it.

I need help!

The temp address is www.st79startlogic.com/~wearecio

thank you

I'm using the same host iPower.com (side note: awesome host and very reasonably priced)

My thoughts are to use http://dbrs-test.com to develop then move the site and database to the new server on the same host. I don't think I'll have any issues but wanted a few expert opinions.

One issue I have is the mySQL user naming and database naming. iPower forces the names to have a prefix of the site name. For example: if you create a database on http://dbrs-test.com, the database has "dbrs-tes" as a prefix and so do any user accounts. I assume this can be handled in settings.php.

I haven't attempted to move a site yet; I wanted to get some input first.

Thanks,

Leo

DBR Systems, Inc.
Indutrial Automation Experts

DBR Systems, Inc.
Indutrial Automation Experts

Yep, that shouldn't be any problem at all.

In that case the database name that you enter in settings.php will just be dbrs-tes_example or dbrs-tes-example.

------
Felix web Creations | Think Happy!
Forward Therapy : Solution-focused Hypnotherapy Northampton

I too am new to Drupal. Here's my scenario:
hosting Windows 2003 IIS
MySQL 4.0.25-nt-max
Drupal 4.6.6
Not using Clean URL option

I had a test site set up in a 'drupal' sub-directory, with a "coming soon" page set in the root. As soon as I got the entire site set up, and poulated in the sub-directory, I moved everything up to the root. Since my "coming soon" page was .html, and my drupal index is .php, I didn't have to worry about deleting any of my files. I made the $db_url, and $base_url changes to the settings.php file. I didn't initially check the file permissions on the server, but even after making sure they were set correctly, I am still getting this error:

"Fatal error: Call to undefined function: db_fetch_object() in c:\files\etc\etc\includes\bootstrap.inc on line 199"

I have also tried backing up my database, created a new blank DB, and imported my data into it, then changed my $db_url setting to the new DB, but am still getting the bootstrap.inc 199 error. Does anyone know what the Fatal error message means? Or is it a generic message that could mean a lot of things?

I had the entire site up and running right from the start in the sub-directory, I can't figure out what I could've done wrong...

It seems a fairly straight-forward process...

Thanks for any help you all can provide me.

UPDATE (30 minutes later):

OK. Since I have been scratching my brain for over a week trying to figure this out, I thought I'd try one more thing. Last week, to "move" my Drupal site up one level to my root directory, I ftp downloaded to my desktop, then uploaded those files/folders to the root. I then deleted the entire 'drupal' sub-directory from the server. (So only the drupal folders were on the root level, relational to each other.) I just now restored the drupal sub-folder onto the server, so I now have a drupal setup in the root, as well as within a 'drupal' sub-folder. After restoring the sub-folder, I am able to get to the site. I do randomly get the bootstrap.inc 199 fatal error messages, but if it refresh my browser (OSX Firefox) a few times, the correct page will load. Although, now that I think of it, that is probably a cache issue... My drupal files must be looking for something within that 'drupal' sub-directory. I just can't think of what it might be...

I am thoroughly confused, and can really use another mind. The site I am working on is: http://www.teatots.com

Can you at least tell me if you can see the colorful graphics, and animated train? Also, let me know if you get any error messages.

Thank a ton!

And everything went smoothy so far :)

I turned off cache, disabled clean URL's, and set my site to offline.

I downloaded export db from old host.

On my new host, I set the database name, user, and password as the same as my old host.

For the hostname for my new server, I had to change my settings.php file and changed the line

'mysql://username:password@localhost/databasename';

to

'mysql://username:password@mysqlserver.example.com/databasename';

because my new host doesnt allow localhost, and has the hostname SQL sever on a different server than the site. I also changed the base url line.

I then downloaded all the old files from my old host and uploaded them to the new host along with the new settings.php file.

Everything seems to be working 100% fine.

http://www.kylube.org - Crazy Website

http://high-school-dropouts.kylube.org Helping High School Drop Outs

Alright, new problem (I can't seem to get any help in answering this question)...

I have one drupal site/separate database running on 4.7 (http://middlesell.com). I have installed the new drupal (5.0 rc1) to (http://umw.middlesell.com). I want to take all of my users & passwords with me, though. How do I do this?

I am relocating my drupal site from my sites public_html/drup474 to public_html so that my site url is now mysite.com instead of mysite.com/drup474. After I moved the files and changed the settings.php file I expected things to work. I get something, but no themes and no ability to log in. Any idea what else I need to change

Rich

Rich

Clean urls?

------
Felix web Creations | Think Happy!
Forward Therapy : Solution-focused Hypnotherapy Northampton

Please see my post http://drupal.org/node/106176#comment-184574 for my solution.

Rich

Rich

SORRY BUT this is my version of the problem. Hello i am a drupal newbie. I need to make some changes to a drupal website. I have a pc running on windows 7 but have no access to any database backup for this site. I have finally managed to install drupal and everything seems to be working fine. My problem now is having the downloaded the site from the server, i need it to work with my drupal 6 installation.
Please note i have DO NOT HAVE ANY DATABASE BACKUP. Can anyone help me please. I'm quite desperate please.

your database contains most of your content. if you don't have it, you need to get it.
if you really can't get it, then you have lost all your content !!!

I'm completely new to Drupal, but not at all new to computers and most hosting issues other than CMSs. Client wants help moving from one host to a different host. I've read the posts on this thread and believe that I understand all the database exporting/importing, directory copying and configuration file changing issues.

I've read about optional Drupal 'modules' used to extend the functionality of a Drupal installation. The client has no idea if any were added to the existing installation. Do I have to worry about Drupal 'modules' that might have been added to the original site that might not be present in on the new site? or is all that going to be handled by the database import/export, directory copying and config file changing? If I do need to worry about them, how does one tell which are installed in an existing installation?

Thanks!

-bC

Any suggestions what I am doing wrong with my export settings when I get this error? I have tried a multitude of export setting all to no avail.

SQL query:

-- phpMyAdmin SQL Dump
-- version 2.10.0.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 08, 2007 at 12:55 AM
-- Server version: 5.0.37
-- PHP Version: 5.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";

MySQL said: Documentation
#1193 - Unknown system variable 'SQL_MODE'

I deleted the offending line from the sql export, it was in line 5 or so. And tried importing again. I subsequently got this error

SQL query:

CREATE TABLE `access` (
`aid` int( 11 ) NOT NULL AUTO_INCREMENT ,
`mask` varchar( 255 ) NOT NULL default '',
`type` varchar( 255 ) NOT NULL default '',
`status` tinyint( 4 ) NOT NULL default '0',
PRIMARY KEY ( `aid` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =1;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=utf8 AUTO_INCREMENT=1' at line 7

I checked the Import page in myphp on my laptop localhost (in Web Developer) It has alows me to stipulate:

- the Character set of the file

and

- SQL compatibility mode

On the other hand, the Import page on myphp at my web sever does not allow either of these options to be set. The selectors don't even appear.

I trusted the "Drupal Cookbook for beginners" handbook and developed on my local machine per the advice within. I now have a big database that i cant upload unless I scratch out help.

Sorry to hammer for support, but I desperately need some after deciding to develop on my local machine then import the sql database. Please see my above three posts.

Does the target database exist and is it empty?

What are you using to import the database: MySQL CLI, phpMyAdmin, etc?

The target database is as empty as a new Drupal install would be, which is I assume quite empty. I installed using Fantastico. I am using phpMyAdmin for the export and import.

Does the SQL create the database before inserting the tables/data or do you need to create the empty database manually?

Have you compared the source and destination environments? Linux or Windows? What about the MySQL and phpMyAdmin versions?

Hi Bacteria Man, my online server is Linux and the localhost environment on my laptop is... well its Windows machine but that doesnt mean anything does it?

To me the problem came from lack of functionality in the Import options in myphpadmin on the web server.

For anyone having this issue, this is what I did and so far it has worked fine and my entire site is online without any more re-building.

The import function in myphpadmin on the target server did not allow specification of SQL_MODE or CHARSET. So I deleted any reference to them in the source database.

I deleted this line which appeared once at the top of the file: SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO

And I deleted multiple instances of this line, or anything like it: ENGINE = MYISAM DEFAULT CHARSET = utf8

I also deleted from the source file any tables referring to the cache.

I was then able to import the database.

This might bring me problems in the future, I have no idea.

It was an unfortunate process, but I certainly am now more familiar with the database backbone of my Drupal site, having been forced to think about it and get more hands on.

It feels good to be making progress again.

My previous message was alluding to the idea that there might be a difference in phpMySQL versions.

Anyway, I'm glad to hear you're back in business.

I think what happened is that your local mysql install was a newer version with more options than the one running on your host server. Then your export created sql statements for options unsupported by the remote server. Not sure as i didn't see what versions you were running, but that's my guess.

Simplicity is the beauty that hides in the complexity of all things.

I had the same problem, I repaired my database and then did a compressed dump with remember template turned off and the problem went away.
----------------------------
Metal head for life \m/

Please help... I just moved my site over, I backed up everything, emptied all the cache files, turned off clean urls and then loaded everything up to the same hosting provider. Now I get the homepage to appear be can't log in or access any other pages to show up. When I hover over the links I see that the links have "Clean urls" I don't Know what happened and am tired, stumped, and hungry. I need to get this up tonight
Please Help

Brent

You might try jump-starting the site by defining the URL in settings.php.

I had this same error. I was moving it from jamzmgmt.com to jamz.net on the save server I run. What I did was open the SQL dump up and look at line 5 (did a search for) and removed this:

"NO_AUTO_VALUE_ON_ZERO";

Worked fine.

Jason Miller
Jamz Management @ www.jamzmgmt.com

Jason Miller
Jamz Management @ www.jamzmgmt.com

If moving from one host to another and both use Cpanel, can I just do a direct download of the .gz for the mysql db's and the home directory from one site's backup and then upload it onto the other site's backup ?

I've copied my site to another directory (I'm not moving to a different server), where I want to duplicate the site for another purpose with a different database.

I created a new database then imported the original database to the new one.

How do I tell the copied Drupal site to 'read' the new database? What file must I hack into to do this?

Tim

sites/default/settings.php
about half-way throught the file. You'll see the magic line.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

I have tried to the best of my ability to follow all the conflicting instructions and
I now have one beautifully developed site on my localhost (my hard-drive) and
another, completely blank drupal site on my server.

I have installed a new Drupal, FTP'd all my "site" files, module files too. I have
emptied the database and transferred the database from my computer to my
server - so I HAVE (I believe) moved ALL the information...

And yet... I am at square 1.

Where is my site? My does it not appear in the online installation?

Do the dev and web host servers use the same platform, php and database version? Blank screens usually mean some kind of runtime error. Do you have access to the web host's error logs? It's probably something minor. Keep digging.

Hi Loren,

This is strange, i can have some of our drupal trained technical staff look into it.
please email me if you are interested.

Ps: this is a no-obligation, free of cost offer for help :)

Regards,
Steve

steve@DrupalValuehosting.com

http://www.DrupalValueHosting.com

I did a move where I thought I was copying "only the files I added or changed" from local to server ... copied over my sites/default folder, but failed to copy over my sites/all/modules folder. Once I did that, no more blank page. Actually I think I had to disable and re-enable the modules as well. Some settings under the hood there or something.

Also noticed the temp folder had to be changed as well as the database in settings.php as others have pointed out.

Hi

I understand that prior to moving a site from one host to another, one should turn off clean urls.

Unfortunately, our move has been precipated by the current host going out of business, and the drupal site has been inaccessible since i read about this, though i still had CPanel access. attempts to get support have failed....

so, not wanting to wait for our site's impending death and so lose everything, we're transferring to a new host now, without having been able to turn off clean urls (or turn off the site for maintenance).

what are the likely consequences of this, and can they be corrected? we're on 4.7 now, but will be happy to upgrade when my schedule permits...

many thanks for any help or suggestions. NOTE please keep replies specific, as i'm fairly green to these sorts of things (have comp sci degree, but that was years ago...)

You can move between two correctly configured hosts with clean URLs enabled, without any ill side-effects.

In any case, you will be able to access existing pages by prepending "?q=" to the url (e.g. www.example.com/?q=admin) to temporarily turn off clean URLs.

Yeah, it's not fatal.
The warning is there because things appear broken if you place a clean-urls-enabled Drupal site on a host that hasn't yet been tested for rewrite support.
If your target host DOES have rewrite and the rest of the requirements (AllowOveride ALL) already configured, you'll be cool, but if it doesn't, the drupal diagnostics that help you will be unavailable (except via ?q= paths)

Basically, on configuration Drupal inspected the environment, tested itself, then enabled the feature and assumed it would work from then on. You've now swapped the environment out from underneath it, so its assumptions may be wrong.

I think there's an answer in the troubleshooter, but

IF you find there are problems, visit
?q=user
to log on. Then
?q=admin/settings/clean-urls
to unset it.
Your interface will be usable again.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

Thanks to both of you, that's a relief.

So, just to be sure I understand:

1. If the new site has the capabilities you're talking about ("rewrite and the rest of the requirements (AllowOveride ALL) already configured"--those are host dependent, not something I set?) then no worries; but worst case scenario

2. If it doesn't, I simply turn off clean URLs as outlined above and we're good to go, except that the URLs will be uglier?

Much appreciated!

I didn't set clean URLs. Stupid mistake on my part, but I'd rather not start over if possible.

I tried the above and can get to the ?q=user page, but when I try to log in, I get a page full of errors, and I can't get to any admin pages because the login didn't work. Notably, the page of errors looks like it's checking the wrong database. (I have a few different ones on the server.) I know my settings.php file is pointing to the correct database, as is obvious from the front page working.

Can anyone help me out?

http://216.120.230.29/techtalkforfamilies/?q=user is the new site. I haven't transferred the domain over--don't know whether I should yet.

Oh, and I know mod_rewrite is on.

Will switching the domain fix this problem? Is this why the links aren't working, especially since the drupal install is not in the root? (I tried changing the base_url, and it didn't help.)

Dale
http://techtalkforfamilies.com

Dale

Error "messages" are so called because they are supposed to carry information, and may be useful to pass on to anyone interested. Saying you get a message but not saying what the message is defeats the purpose of the message altogether. It's no longer a message at all if it's not being delivered anywhere ;-)

And just because there's lots doesn't mean you should ignore them all either. There's only 5 or 6 unique ones, repeated a bit. And only indicating two problems. The "Headers Already Sent" we can ignore, leaving you with just one symptom.
In your case

Warning: Table 'crossfe_crossfeednews.users' doesn't exist query: SELECT u.* FROM users u WHERE u.uid = 0 in /home/crossfe/public_html/includes/database.mysql.inc on line 121

I'd say the right database is being found BUT you appear to have a bunch of tables missing.
Compare the schema on your old and new site. Are those tables transferred right?

Something went missing in your export or your import. Try again, and watch for errors this time.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

Actually, crossfe_crossfeednews is the wrong database. It's crossfe_techtalkforfamilies. crossfe_crossfeednews is for a different site on the server.

But good point about messages. Thanks.

Dale
http://techtalkforfamilies.com

Dale

I have 1 theory: the server sees http://216.120.230.29/techtalkforfamilies/anything_else_after_that_slash and assumes everything after the IP address is part of the original URL. That would also explain why putting the ?q= makes links work.

So here's my proposed theory, and I want someone to tell me whether this sounds correct: If I set the domains to all go to the new server and appropriate directories (and I use cpanel to add domain correctly), it will just work, as then the server will know that the techtalkforfamilies directory only corresponds to the techtalkforfamilies.com domain and the crossfe_techtalkforfamilies database.

Yes? (Note: I don't know *any* PHP or mySQL. This is all a guess.)

Finally, is there a way to change my root .htaccess file to ignore the techtalkforfamilies folder to test this theory? (I don't really know anything about those files, either, so the exact code needed would be greatly appreciated if possible.)

Dale
http://techtalkforfamilies.com

Dale

I was simply trying to move my database to a different server on the same host, but the sql file I end up with when I backup my database is over 800k; phpMyAdmin apparently limits imported file sizes to 20k, so it looks impossible.

Since my host is giving me static about copying the sql file to a new server for me, I'm now considering a new host for my Drupal site, one with much faster database servers. Any suggestions for a full-featured commercial host with up-to-date MySQL, who are more flexible about doing these sorts of tasks for a new user?

Thx!

20K is totally ridiculous. That must be wrong.
You are advised to TRUNCATE TABLE 'cache'; TRUNCATE TABLE 'watchdog'; and a few other cache_* ones before bothering with a backup/transfer. Just to be tidy. They are just temp tables.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

You're right; apparently I read it wrong, the limit is 20 megabytes! (when I saw 20,480 I did not notice the KiB afterward and erroneously assumed they meant bytes!).

It was a brain-dead moment. :)

Andria

My web partner and I have nearly 20 sites (all bar 1 are Drupal) and have just moved all of them including 4 coppermine galleries and a large phpBB forum to Iron Mountain. I can honestly say thay they have been fantastic and the move has gone extremely smoothly. They assisted where they could, especially installing the larger databases, and advised when things needed a tweak to work. But all sites are now up and running and on reading this thread, cannot believe we did it with no major issues. I am sure it was down to the professionalism of iron mountain.
And we didnt turn off clean urls with any of them. We did make sure they were all up to date with Drupal 5.7 and all the many many installed modules were up to date too. But no problems and a great relief as you can imagine for us.

I really need help on this. I developed a site on XAMPP and have backups of my DB and Drupal 5.7.
On XAMPP my site is at http://localhost/drupal-5-7

Here is what I did:
1) Turned off clean urls
2) Clear cache using the Devel module (message said it was cleared)
3) FTP'd to my web host
-----a) /var/www/html/drupal (yes, I dropped everything from XAMPP (just the drupa-5.7 folder) into that drupal folder
4) moved over my database
5) made sure that the setting.php file had the proper settings

Here's what I get:

1) All the nodes and themes came across fine
2) All the images have not- seems like everyone of them have a http://mydomain.com/drupal-5.7/files/images/myimage.gif on them
3) All sime links have the same problem, even the ones that are external links.

There are hundred of images and links. How is the best way to fix this?

Without saying, thanks a ton for any help.

Tom

First thing is to check the pathauto table. I suspect the paths are wrong. You might need write some queries to clean them up.

I looked at all of my databases since I have a long list since beginning development. There never has been. I also looked at the path auto module and that looks ok.

How did you insert the images?
with a wysiwyg?
Did you use root-relative paths (good and portable) when entering the location of the images, or have you hard-coded the full http: URL every time (bad)?

Paste a sample of your source where the image tag is bad. In a new thread issue please.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

I have moved a drupal site from one host to another and also changed the URL.

I exported the database, changed all page url references, imported into the new database, edited settings.php and pointed the base url to the new site URL.

All links but the top menu links work fine. The top menu tabs point to the old URL.

What did I miss.

I appreciate the help.

Thanks
John

Thanks
John

Did you make the menus with relative paths instead of absolute ones?

-------------------------------------------
Interactive Worlds and Immersive Obsessions
http://www.asifproductions.com

I'm guessing here based on the information you provided.

You probably missed some url references when you were changing them in the exported database. You can check this by looking at the values of the 'path' column of the menu table.

Ok, so I backed up my dB using mysqldump command (mentioned above) every night and I backed up all Drupal files a few days ago (don't think I made any major changes since then) and I have restored my site to the point I can see it (on another PC I have created other sites on).

But I am having three problems that I am sure are all related:
1) All page accesses require ?q= (used clean URLs on original site)
2) I am not able to log in as an admin (assume this is due to Item 1)
3) Several menu items relating to installed/core modules are missing (I suppose I had required permission to view, so this is probably only related to item 2.)

So I suppose if I can somehow solve Item 1, the other issues will resolve themselves :)

Since I did not have a chance to disable clean URLs prior to moving it, I am not sure how to fix the issue?

I don't know much beyond the basics, so if this is a fix requiring detailed SQL quiries, I could use some explicit instructions.

If it matters, I have Drupal 6.1, MySQL 5, PHP 5, and Apache 2.2 running under XP (yea I know...tsk tsk).

Thanks in advanced.

Dan

Need Drupal module or theme design? Please visit Webdrips to learn how we can help.

I think your 'backup' missed the .htaccess file. This is common, as it's a system hidden file.
You won't get clean-urls until that's replaced.

You should still be able to login to the point where you can disable clean-urls temporarily by following the steps above and get a working site.

Yeah, if you've failed to log in, then you are probably right that the missing menu items are because of that.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

But forgot to copy it as you suggested...I had it in my backup folder...problem solved with 2 seconds.

Thanks Dan.

Dan

Need Drupal module or theme design? Please visit Webdrips to learn how we can help.

Hi all.

Anyone move from Apache to IIS server?

I seem to be able to see all the pages after turning off clean URLs, but I can not log in as the admin. I do not get any errors & it just bumps me back to the main screen. Any idea what might be wrong (aside from the fact that I am depending on IIS :) )?

I've looked around the Drupal help, but most of the advice seems to be directed to people using Drupal 4.7 (I am usning 6.1).

Note: I do not have the cache enabled (although the Glossary module seems to cache information, but I can't imagine that being the issue).

I guess this must have something to do with the .htaccess file? (It got copied over, but not modified in any way.)

Thanks,

Dan

Need Drupal module or theme design? Please visit Webdrips to learn how we can help.

You probably need a new thread for this.
Try inspecting the watchdog logs directly in the database table which will show the successful or failed login attempt.
Could be to do with session support, cookies etc, which are a bit different over platforms, and may need a little extra love to get PHP on IIS to retain. For EG, I think PHP may require write to a temp dir to save sessions in (by default, there are mem-only and DB options also via php.ini IIRC).
No sessions, no login.
Play with phpinfo and check that php sessions work at all on your setup.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

My host told me I had to back everything up on my vds server so they could do a upgrade to apache. My VDS has plesk. I backed up up my entire site with Plesk backup feature and then downloaded the huge 945meg file to my computer. After the host upgraded my apache I went into my new Plesk and restored my drupal site. Everything seems to work except the PM system (we can all read the PM that wer written before the restore - when we write new one's nobody gets them) and the log files (when i used to click on administer I used to se all kinds of messages). Can any of you experts tell me why these two systems might not be working?

http://skatopia.net/

I managed to get my errors to print to screen. This is what I am getting when I try to send a pm.

user warning: Duplicate entry '0' for key 1 query: INSERT INTO privatemsg (author, recipient, subject, message, timestamp, newmsg, hostname, format) VALUES (1, 136, 'test', 'test', 1207716296, 1, '75.35.21.202', 4) in mydomain/httpdocs/includes/database.mysql.inc on line 121.

Had to go to phpmyadmin go to "privatemsg" and turn on "auto increment" on the "id" column under "extras".

Greetings,

I just had the same problem. Yesterday, all was well, and today the exported MySQL file looks corrupted no matter what options I select. I re-installed my local WAMP server (Uniform Server - portable) from yesterday. I copied in today's MySQL data and files and everything works correctly for localhost Export and import to my web host (bluehost.com). I must have modified/corrupted some WAMP configuration file by mistake.

===Correct====
-- phpMyAdmin SQL Dump
-- version 3.1.0
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 02, 2009 at 09:04 PM
-- Server version: 5.1.30
-- PHP Version: 5.2.8

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

====ERROR========

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET
@OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET

===
I suggest re-installing your local WAMP server instead of modifying the dump file...
-Carpe Diem!

Carpe Diem ! - www.happyotter.com

I've been reading all these posts and picked up a lot of good advice as a newbie. However, one thing escapes me, and that is how to handle different database names.

My scenario is the following:

I created a new domain with a hosting company that supports the latest MySQL, PHP etc. I managed to create the database, set up Drupal 6, and all is OK. But I stopped there, because in the meantime I read that a development server is a good idea. So, I set that up on my laptop, and, again, all went smoothly. I even started to develop my new site on the development set-up. Now, I'd like to transfer my local database to my hosting company's server in order to make my site "live".

Here's the problem: in my eagerness to start, I gave my local database a different name and password to those on the hosting server. Am I in trouble here if I try to transfer my local database to the hosting server, and the names don't match? If so, how do I change the name of (preferably) the local database?

Hi astroguy,

Database name, username and password should not matter for the content. These are stored anyway in the settings.php file (check sites/default. So set your sites in maintenance mode, back-up the databases, delete everything in the old production database and upload the new database. It should work...

Good luck!

This may be a dumb question, but...if the database name, username, and password all all the same, and you just want to move the site with all the data intact...why do you need to export/import? Why can't you just copy the entire mysql folder, including the entire database, and just put it on the new site without messing with import/export?

When you're working on a remote host you only get the services the host allows you, and the setup of the machine itself is not really in your hands. Typically on *nix hosts, what you propose is not practical. Indeed it is typically impossible. You are probably running your site on a Windows server which you have full admin access to. But if you ever wanted to move that site to a hosted LAMP system, for instance, you'd have to find another way.

-------------------------------------------
Interactive Worlds and Immersive Obsessions
http://www.asifproductions.com

I will be transferring my local drupal site to godaddy...shared LINUX hosting deluxe ACCOUNT no command line access.[ if ANYONE CAN RECOMMEND A BETTeR HOST THAT CHARGES BY THE MONTH..pls let me know.]
So, I'm thinking to do a one-or two click auto drupal install on godaddy,,this creates a new db of course on the godaddy server..will i be able to update this NEW drupal db with my old drupal db back up in sql format?

Hi,I have developed my site in windows ...now i want to migrate the whole site to linux(red hat) platform..How do i do that? and can anyone give me the detail steps to install drupal in red hat Linux ..

Which part of the documentation or this thread are you having trouble with?
If some parts are hard to understand, perhaps the instructions can be improved.

moving a drupal site using command line & ssh SOLVED

First do the following on the current, or existing server site, that is, where the current drupal site that you want to move is located. Yes, if you don't have command line access this won't help you, but it is my offering and it works very cleanly. the only got-cha's I have found are:
∘ a) new server does not have mod-rewrite enabled and existing site does
∘ b) new server does not have GD graphics libraries installed/enabled

∘ There are some shortcuts that could be taken, but this works and may be helpful to a beginner as the steps illustrate exactly what has to happen.

• 1) TARBALL THE EXISTING SITE DIRECTORY (sitename = drupal root dir)
ssh into the server, then do this from one directory "in" from where the site is: i.e. if site is at /var/www/sitename then cd to /var/www/ and run the command.
∘ sudo tar -cvzf sitename.tar.gz ./sitename


• 2) MAKE A COPY OF THE EXISTING DATABASE
∘ mysqldump -uDB-USER-NAME -pDB-PASSWORD drupal_db_name > drupal_db_name.sql
∘ (you may have to use sudo if you don't have permission to write to this directory)

• 3) TARBALL THE EXISTING DATABASE DUMP
∘ (yes, I know you can do this with one tarball, but this might be clearer for some)
∘ sudo tar -cvzf drupal_db_name_sql.tar.gz drupal_db_name.sql

∘ Now you leave the server that has the existing (to be moved) site and ssh into or logon to the NEW server. You can log-out of the original server if you want and to avoid confusion, but you might want to stay connected just to verify file names.

ON NEW SERVER.
• 4) GET THE DATABASE (cd to the directory BEFORE where you will install the drupal instance)
∘ scp your_user_name@original_server_name.com:drupal_db_name_sql.tar.gz /var/www/
∘ NOTES
∘ you must have permission to write to this directory. If you don't you can save to your home ~/ directory then move before next steps.
∘ don't forget the ' : ' after the server name.

• 5) GET THE DRUPAL SITE DIRECTORIES
∘ scp your_user_name@original_server_name.com:sitename.tar.gz /var/www/

• EXPAND THE DATABASE SQL FILE AND THE DIRECTORY TREE
∘ (be in the dir before where you want the drupal root dir to be)

• 6) sudo tar -xzf sitename.tar.gz
• 7) sudo tar -xzf drupal_db_name_sql.tar.gz

• EDIT THE SETTINGS.PHP FILE
∘ You have to possibly change two things
∘ -- The database log-on credentials if they are different (most likely)
∘ -- the $base URL if it is different (most likely but not necessarily)

∘ go to your new drupal site tree, change directory to: (if /var/www is your web root)
∘ /var/www/sitename/sites/default
∘ sudo nano settings.php (vi or whatever)

• 8) find $db_url = 'mysqli://db_user_name:db_password@ORIGINAL_SERVER/SITENAME_DIR';
∘ CHANGE IT TO NEW_SERVER. NOTE new_server and old server may very well be "localhost"
∘ change this as required.

• 9) $base_url = 'http://old_site_server.com/sitename'; // NO trailing slash!
∘ change as required to new server / URL . don't loose the ' at the end and as it says NO trailing slash!
∘ save settings.php

• 10) go to browser and fire that puppy up! You should not have to restart apache (or whatever) unless you had to fool with the mod-rewrite or GD libraries

I hope this helps someone.

nao sei muito bem o que mas ter alguem falando ja é algo

When moving a Drupal website from one host to another, do not forget to take a note of the activated modules, since after setting up your site on a new place and running update.php naturally only the modules existing on a new host will be activated and the state of rest of the modules, which you were using on the old host, will be set in database to off. This could create lot's of troubles in case you used many custom and contributed modules. The differences between versions of the modules used on old and new host also could cause lot's of issues.


---
Need reliable Drupal hosting with Apache Solr Search and more? Consider http://drupion.com!

A good easy to follow guide is

How to transfer a Drupal SIte
http://squirrelhosting.co.uk/hosting-blog/hosting-blog-info.php?id=26

This has step by step instructions designed for even a Drupal/Hosting 'newbie' to follow

Steps :

1. login to the cpanel of bluehost(just taken an example).

2. create a database for your project.

3. create a user for your database.

4. Add the ip of bluehost to your “hosts” file(/etc/hosts)like below
(If you won’t add the ip in your hosts then the site will point to the live site)
69.195.124.89 yoursitename.com
69.195.124.89 http://www.yoursitename.com

5. get all the data from your hosting site through FTP/SSH

One easy way to get the data :
get all the data using “rsync” command in your local computer

rsync -azpSv username@host:/home/yoursite's-root-directory/ ./

6. make a zip file of your data and upload it in your bluehost cpanel through filemanager interface

7. Import the database from where you have kept earlier

8. Change the configuration file(for database and all…)

9. the hosting server has been changed to Bluehost(from Dreamhost)

10.Now check in your command where the site is pointing now by giving the following command:

ping yoursitename.com

if its showing the same ip address i.e 69.195.124.89(as we used it above) that means Thumbs Up!! otherwise check your hosts file.

Note : Now the domain should point to name servers of your new hosting sites

This post has been started at January 25, 2006 at 7:50pm. Pretty sure after many useful advises here user has found a solution.

cPanel / Drupal Hosting from €1.99 | VPS hosting from €7.99

EURO-SPACE - Reliable Hosting Solutions Since 2007

True. However lot's of visitors of the page other than post owner dealing with the similar issue can benefit from reading through. So no worried if old threads still get replies.

Those who prefer to work on SSH shour read how we do migrations at Drupion on
http://drupion.com/resources/general-information/migration

Drupion.com — Drupal-centric, Drupal-specific, Drupal-optimized hosting company.