Friday, February 24, 2012

HOW TO TRANSFER LOCALHOST WEBSITE TO 000WEBHOST

it took me a million hours just to know this thing, i surfed the internet for like an eternity, pieced every puzzle, until i got it. I FINALLY GOT IT. Whew. so much for this. lets get to the REAL DEAL!

LETS DO THIS.















First things first.

YOU NEED TO HAVE:
  • a working website in localhost (in the tutorial im gonna use XAMPP)
  • an domain hosting account (i have dot.tk)
  • a web hosting account (in this case, we're gonna use 000webhost)
  • FTP software (like FileZila)
HOW TO DO IT:

  1. Download XAMPP contol panel, REMEMBER ITS LOCATION
  2. Register accounts at dot tk and 000webhost
    • go to dot.tk. put a desired domain name. check if its available. if its available, don't register yet, just leave it there. change tabs and go to 000webhost.
    • on 000webhost. put your chosen domain name, the same thing you entered at dot tk.
    • continue registering at 000webhost, activate via e-mail.
    • at 000webhost, go to 'members area' (lower right panel)
    • go to cPanel, find "View Account Details"
    • now you see the details of your account. did you see the 2 nameserver details? you're gonna need it in dot.tk, here's how:
      • in the 'Use your new domain' label, click the 'use DNS' radio button. there you're gonna see 'Dot TK DNS service' and 'your own DNS'. Choose 'your own DNS', copy the nameserver in the 000webhost that i've said earlier with IP address, select Registration length to 12months , then sign up.
    • here's the long part — after you've registered, YOU'RE GONNA WAIT FOR 1 DAY TO ACTIVATE IT. yup. 1 day. (or 12am from now) so you're gonna continue your web tomorrow. bookmark this page and open it tomorrow for the next step. see you tomorrow! remember to bookmark this page.
    • i suppose you're back and your ready. your 000webhost is now connected to your dot.tk account. to make sure, login to 000webhost.com and check if there is no notification about the 24-48 hour thingy. if there's none, Lets do it.(again)
  3.  install FileZila on your computer. run it. there, you're gonna see Host, username, and password:
      • in host, you're gonna enter the dot.tk domain you've created (e.g. anterey.tk) without the http://
      • on the username, you're gonna use the FTP username on the 'File Upload Details' located at 'View Account Details' found in 000webhost cPanel.
      • use your 000webhost password. 
    • if it is connected, you're gonna see the 'public_html' folder at the right pane. what you're gonna do is:
      • locate your prestashop directory found in XAMPP (xampp/htdocs/prestashop)
      • you can either transfer the whole folder and drag it all inside the public_html folder, or you double click it, ctrl+a then drag it all inside the public html folder.NEVER DELETE THE .htaccess file found outside the public_html.
      • it will take a while depending on your internet speed.
    • while transferring, open xampp program, check the mysql, then start service, then go to localhost/phpmyadmin 
     4. EDITING THE DATABASE.
    •  locate your database used in the website. then in the toolbar menu, select Export. save as .sql .. find the database.
    • open the database using wordpad (so that you can read it more clearly.) then:
    • go to cPanel on the 000webhost, in 'Software/Services', click MySql. there is a notice written in there saying "Important: MySQL Host for any database in this account is ******.000webhost.com , do not use localhost!". copy it.
    • press Ctrl+F, type in "localhost", then change the found word to ******.000webhost.com
    •  press Ctrl+F, type in "PS_SHOP_DOMAIN" , change the values to the dot tk you've made (in my case anterey.tk)
    • press Ctrl+F again,then type in "PS_SHOP_DOMAIN_SSL" , change its value to.. (in my case anterey.tk) then hit save.
    • go to 000webhost → cPanel → MySql, then fill up Create new database and user. once it's created, 
     5. EDITING THE SETTINGS.INC.PHP
    • open settings.inc.php located at xampp/htdocs/prestashop/config , copy to desktop,then open with WordPad, and change the following values:
    • change '_DB_NAME_''s value to the name of your database you've just made in 000webhost.
    • change '_DB_SERVER_' 's value to ******.000webhost.com
    • change '_DB_USER_' 's value to your username in the database you've just made in 000webhost.
    • change '_DB_PASSWD_' 's value to your password in the database you've just made in 000webhost.
     6. IMPORTING THE DATABASE TO WEBHOST
    • go to cPanel, then in the Software/Services panel, choose phpMyAdmin
    • you will see an interface just like in your localhost. select your database at the upper left corner of the screen.
    • this time, Import your database, its beside the 'Export' button, press Go/Next.
    • wait for it until it confirmed.
     7. TRANSFERRING THE SETTINGS.INC.PHP
    • go to FileZilla, reconnect to your webhost, click public_html/prestashop/config
    • drag the settings.inc.php you just saved at your desktop to the directory.


And there you have it. You've done it! :D
to make sure, open a browser, then enter http://(anterey).tk/prestashop and see what will happen...


There you have it. i DOES work for me.. if it doesn't work for you. im sorry bro. just search for a better tutorial than this.
Thanks.
Regards.
-Anterey.

No comments:

Post a Comment