Hello, I am just getting started with drupal and have xampp set up locally on my pc. I am wondering can i create the whole site and then move it to a live webserver? What is involved when moving the site over? Once the site is live will I be able to do updates locally and then move everything over?
regards,
Steve

Comments

nisguy’s picture

Sure, you would need to archive (ZIP or TAR) the file structure and FTP it into the new location. Then, setup the database the same way as on your development machine and do a SQL Export/Import for all the tables and data. I do it all the time, but only on the same server (for creating test/experimental sites).

tiki16’s picture

Hi, why do i have to zip and then ftp. can't i just ftp from my machine to the web server? Do i have to do this everytime i upload new changes?
regards,
Steve

behindthepage’s picture

zipping is more efficient but you don't need to do it.

You also need to export your database, create a database on your live server and import it to that database then change your database settings in sites/default/settings.php

gpdinoz
"Everything should be made as simple as possible, but not simpler." - Albert Einstein

Regards
Geoff

tiki16’s picture

Hi
I ftp my local site to the server. I then exported my Db as sql and zipped it from my local site and tried to import with phpmyadmin on the server but received an error. Did the same as a csv but still the same error. Error message states that i "may have found a bug in the sql parser".
Also this message:
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 'PK' at line 1

Not sure what to do at this point. I am fairly new to php/mysql.
regards,
steve

behindthepage’s picture

When you export the database you can choose to export it as a zip or a gz or no compression. Once you have exported it don't compress it, just upload it how you exported it.

gpdinoz
"Everything should be made as simple as possible, but not simpler." - Albert Einstein

Regards
Geoff

tiki16’s picture

Hello, I was able to move my site from one machine to another and transferred the DB. The site is running fine on my new machine. I was able to import the DB to my live site and all the tables have been setup correctly in phpmyadmin.
I am now encountering a problem with connecting to the DB through my settings page. This is the error I receive:

The MySQL error was: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2).
Currently, the username is admin and the database server is localhost.

This is my code:
$db_url = 'mysql://admin:password@localhost/dev_mybiosph0001';
$db_prefix = '';

Any help appreciated

sudhii9999’s picture

Hey man

the one which is there presently denotes the local host database username and password. as u are in the live server u need to change that url to the live server database address.

this will resolve the problem

have fun

sudheer varma

qillbel’s picture

HI all...

I've this message...
"PDOException: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) in lock_may_be_available() (line 167 of /home/qillbel/public_html/unispaces/includes/lock.inc)."

I changed the username and password in setting.php, but it always gave me this error message.

What I did are :
-copy all website files from local server (localhost) to my server (live server).
-make a database and import the .sql from local server (localhost) to my server (live server).
-change adjust setting.php. This is the part that I change in my setting.php

array(
* 'driver' => 'mysql',
* 'database' => 'qillbel_unispaces',
* 'username' => 'qillbel_unispace',
* 'password' => 'talake22npt',
* 'host' => 'localhost',
* 'port' => '',
* 'prefix' => 'uni_',
* 'collation' => 'utf8_general_ci',
* );

So, is there something that i missed ?
thanks for any suggestions....

missmobtown’s picture

Hmm. I've never had to use the prefix or collation fields in my settings.php file. What happens if you leave those blank?

Also, just double check that your db user is assigned to the correct db on your remote host with global permissions. Sometimes it's the little things...

Good luck!
CG