hello
any body can help me please .
i create my website on my local machine, its work well and i have no problem .
now i want to upload my website on server , i have C panel , MySQL , and Phpmyadmin on server side.

So i do the following steps :
1- export data from my local machine and Uploaded to MySQL on server .
i have the Data on server Side without Problems.
2- I uploaded my website Folder from local machine ( As ZIP File ) To Server side ( by using File manager ).
the ZIP folder now at ( Web Root (public_html/www) ) .

SO what i should do now to activate my website ?

thank you for helping me .

Regards

Comments

wonder95’s picture

Here's how I always do it:

  1. Dump database (structure and data) from local machine to .sql file.
  2. Create database on server, and import data using phpMyAdmin
  3. Upload files to server in one of two ways: a) just straight using FTP client (I use FileZilla) or b) as you did with .zip file. If you use b), go into File Manager in CPanel, select zip file, and choose "Extract File Contents" on the right.
  4. Make sure settings.php (in sites/default) has correct settings for MySQL database.
  5. Once in Drupal, go to Admin -> Site configuration -> File system and set the new location for the temporary directory.

After that, you should be all set.

smdahmed’s picture

Hi Wonder95,

Can you please kindly help me with some basic steps on how to dump database into .sql file and upload and import of the database to the website from local machine?

My issue is that - everything works as expected in local machine but I dont have a clue on how to upload the local website to webserver.

I need some basic steps and I hope there are such basic steps. All I need is to find out that information.

thanks
kabeer.

mike_sandes’s picture

==========On your local machine================
1. Go into PHPmyadmin using your username and password
2. Select your Drupal database you want to dump.
3. Click the 'Export' tab
4. Select the 'SQL' radio button and click 'GO'
5. Save file in /downloads folder.
==========On your Hosting Service===============
1. Log into your hosting service and go to databases (this varies by hosting service)
2. Get into PHPmyadmin on your hosting service or use Cpanel
3. Create new database with the same name, username, and password as your local one.
4. Select the db and click on the 'Import' tab
5. Browse to you local .sql file, make sure the 'SQL' radio button is selected.
6. Click 'GO' - this sets up all the tables and fields writes in all your local data (it will take some time).

seoteja’s picture

Hi
I did exactly but still i have problem
it just showing error message

'Fatal error: Class 'PDO' not found in /home/techitx1/public_html/includes/database/database.inc on line 184'

thanks for helping...

seemashah’s picture

Hi

I am also facing the same problem for one of my website

eng_sinan’s picture

i dont understand this Point ((Make sure settings.php (in sites/default) has correct settings for MySQL database.))
what should i do with this file ? and what is the Correct settings?

Alos ((new location for the temporary directory.)) , where should i put it on server

any Advice or Document will help me thanx .

eng_sinan’s picture

please any one can help me how to modify the database and password in the setting.php file

i have inside the file the following statement::

Database URL format:
* $db_url = 'mysql://username:password@localhost/databasename';
* $db_url = 'mysqli://username:password@localhost/databasename';
* $db_url = 'pgsql://username:password@localhost/databasename';
*/
$db_url = 'mysql://root:root@localhost/data1';

i want to ask about @localhost , i creat this data base on servr

thanx

wonder95’s picture

I had long answer to your second question, but it looks like I didn't hit the Submit button. Dang...

It will still be @localhost, since the db is local to the server where Drupal is running.

skuchy11’s picture

you have to write the user name and password of your web server database
and instead of the local host write the web server name also don't forget to write the database name.
the url will be
$db_url = 'mysql://un:pss@sn/dbname';

only change the following :
un --->web server database user name
pss---> web server database password
sn ---> web server name
dbname---> your web server database created name
follow the same URL syntax.

you can find all these details while having an access to the web server in which you are going to upload your website..
hope this will do....

tiki16’s picture

originally I was using this:
$db_url = 'mysqli://username:password@localhost/mydbname_db';
and i was getting the socket error

I changed it to this:
$db_url = 'mysqli://username:password@mysql.mydomain.com/mydbname_db';

and it worked. Problem resolved.
Note: mysql.mydomain.com is the of the server the database resides on.

parismass’s picture

Hello,

Sorry guys to ask for your help on this basic matter but I am new with drupal7 and I have the same problem.

I created my drupal 7 website on my local machine, it's working fine (it's certainly because I followed step by step the install from the book I bought.)

Now, of course, I want to upload my website on server,

1- I went to my MySQL administration on the server side and apparently my database is ready to be used on the server side.

2- I did the following steps :
I uploaded my files from the local drupal directory using FTP - filezilla. (I can see now all files (includes. modules, sites...) on server side.)

I am aware that I missed something about the MySQL database because I have got the message :

Error
The website encountered an unexpected error. Please try again later.
Error message
PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in lock_may_be_available() (line 165 of /homepages/4/d250257285/htdocs/includes/lock.inc).

SO what should I know and should I do or UNdo now to activate my website ?

3- I know that I add to also add a link in settings.php but what is it with drupal 7 ?

I would appreciate your help.

thank you.

Regards

yenthacorp’s picture

hi i faced a similar problem before when i created a site about my place Trivandrum . now its solved by following the above steps... thanks alot guys....

jawedaan’s picture

Dear rieds

pls help me the problem coming when i completed my uploading drupal website which is running ine in local

the error shows tha

"" Error

The website encountered an unexpected error. Please try again later.
Error message

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

pls tell me by step by step

hanks

tamilanclassifieds’s picture

Good posting.I was searching these things for long time.Fortunately i saw this post.Comparing to Joomla, I prefer to use Drupal for these type of issues

sam1988’s picture

ive been assigned in my university to upload a website to my drupal dev desktop to do some changes on it, the site was made in drupal
ive never used drupal 7 before so any one can help ?
so far i used filezilla to download it on desktop, i am using windows 10 and i have downloaded drupal 7 but i have no idea what to do
i tried to import it id didnt work i think im not on the right track
what should i do ?

webiletechnologies’s picture

You have to visit the link

https://www.drupal.org/node/425892