Very new to drupal, installed it for the first time yesterday.

I have installed drupal on my own linux box. But, I might want to move to a hosted solution, or to another box.

How do I do this without losing the stories. or books, or setup?

Comments

andre75’s picture

-Backup your database.
e.g. localhost/phpmyadmin
or using mysqldump on a shell
-change your settings.php file
to reflect the new location of the database and the new base url
-go to the new location
-import the database
e.g. the phpmyadmin of your provider
-copy all files over
(FTP, or through any other means)
done

You content is all in the database (except images, videos and such)

-------------------------------------------------
http://www.opentravelinfo.com
http://www.aguntherphotography.com

sepeck’s picture

Turn off clean url's
then backup your database.

after you restore to the new host, you can turn clean url's back on.

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

andre75’s picture

I never did that step and never had to. Maybe I just got lucky?
I built my site at home and when I was done uploaded it, without turning off clean URLs.

-------------------------------------------------
http://www.opentravelinfo.com
http://www.aguntherphotography.com

Geary’s picture

Turning off clean URLs is just a precaution in case your new site doesn't support them or needs some special configuration.

If you know that both our old and new sites support clean URLs right out of the box, then there's no problem.

andre75’s picture

Yeah, I know what you mean. It happened once to me (I messed up my .htaccess).
All you have to do though is go to
?q=/admin/settings and turn it off. This works no matter if clean urls work or not.

-------------------------------------------------
http://www.opentravelinfo.com
http://www.aguntherphotography.com

wellsy’s picture

I found that when I tried to login the inability to support clean urls made it nearly impossible to login.

That of course made access to the admin area impossible.

The solution is to enter the login area using ?q=/user/login.
Then use ?q=/admin/settings

This whole proceedure would be useful if it was tidied up and added to the new Site Recipes area I believe.

wellsy

orchidsonline.com.au

wellsy’s picture

I found that a large database (over 10mb) was a problem when trying to dump into MyPhpAdmin.

I found many errors in all sorts of tables even though none were reported by MyPhpAdmin.

The solution is to painstakingly copy only small sections at a time (approximately .5mb) was good) and dump them one by one until the whole database is complete.

wellsy

orchidsonline.com.au

jsimonis’s picture

That can be a big problem. I've run into that myself.

--
Jenni S.

andre75’s picture

That only depends on your host.
If there is a query limit, an upload limit (most have 4MB per default) a timeout, an execution time limit ....
Most of the problems can be solved by changing your php.ini.
I used a php snipplet to copy the default php.ini of my host into my directory and modified it. From then on things went smoothly.
Also large databases should be compressed (gzipped) when uploaded.
Either way, as you mentioned 10MB is just about the limit of pypmyadmin. If you want to go larger, you need a shell login and load the database from there (or ask your provider to do it for you).

Also it depends how you export the database. If you do a dump locally and import it on the remote server there are a lot less inserts to be executed then when you exported all tables with phpmyadmin.

Further, I always empty the following tables:

cache
sessions
watchdog
search
search_index

Search can be rebuild easily on the new site (cron.php) and the other tables are usually not necessary to drag along.
This is usually the major part of the database anyways.

Andre
http://www.aguntherphotography.com

GN’s picture

Yes, especially the cache table. For a small site, it can easily be much bigger than all other tables taken together.
Also, if the dump file is still way too big, you can dump some tables to one file, some to another one, and so on :-)).

sepeck’s picture

Naw, that would go in best practices
http://drupal.org/best-practices
Feel free to write it up and submit a handbook page. It's easiest if you go there and click add a child page.

Site recipes is a spot for how to put together your site. We're working on it and should have some stuff there in the next week.

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

styro’s picture

Dump your local database to a file and restore it to the hosted database.

Copy your Drupal files up to the host (including upload directories etc).

Edit settings.php to reflect your new base url and db connection string.

Baring anything out of the ordinary, that should be enough.

--
Anton