Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Migrating local site to a remote server

Guest
Dec 02, 2010 Dec 02, 2010

I have created a local dynamic website using Dreamweaver, MySQL, PHP and XAMPP.  Everything works fine on my local machine - now I want to upload the site to a domain hosted by siteground.com.  Do I upload all files located within my XAMPP directory? Do I need to change my database connection?  etc??? Just not sure where to go from here.  Any help is appreciated!

TOPICS
Server side applications
678
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 02, 2010 Dec 02, 2010

You upload to your remote server all the files (PHP, style sheets, JavaScript, images, etc) in the site root.

The database needs to be re-created on your remote server. You can do this by using the version of phpMyAdmin provided by your hosting company, and building the database completely from scratch. Alternatively, you can use your local version of phpMyAdmin to export your database to a .sql file on your local hard disk. Create an empty database on your remote server, navigate to it in your remote version of phpMyAdmin, and click the Import tab. Select the .sql file you created earlier, and import it.

The MySQL connection needs to use the hostname, username, and password given to you by your hosting company.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 02, 2010 Dec 02, 2010

Thank you for your help.  My file structure is:  c:/XAMPP/xampp/htdocs/php_test

(folder) and c:/XAMPP/xampp/htdocs/xampp (folder).  Do I upload everything on

/htdocs or just files on /htdocs/php_test?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 03, 2010 Dec 03, 2010

What you upload depends entirely on your site structure. If you're using htdocs as your site root, then you upload both folders. If php_test and xampp are for different sites, upload only the site that you plan to use.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 04, 2010 Dec 04, 2010

I am receiving an error 'Database not selected'.

 

Here is my connection file:

 

<?php

  1. FileName="Connection_php_mysql.htm"

  2. Type="MYSQL"

  3. HTTP="true"

$hostname_connTest = "localhost";

$database_connTest = "coolweb1_phptest";

$username_connTest = "coolweb1_phptest";

$password_connTest = "???????";

$connTest = mysql_pconnect($hostname_connTest, $username_connTest,

$password_connTest) or trigger_error(mysql_error(),E_USER_ERROR);

?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 05, 2010 Dec 05, 2010
LATEST

sherrimarie wrote:

I am receiving an error 'Database not selected'.

What is the name of your database? According to the code you have posted, it's called coolweb1_phptest, which is the same as the username. It's unusual for both to be the same.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines