Uploading current php site to another site.

Reply

Join Date: Oct 2006
Posts: 5
Reputation: new_girl is an unknown quantity at this point 
Solved Threads: 0
new_girl new_girl is offline Offline
Newbie Poster

Uploading current php site to another site.

 
0
  #1
Jan 3rd, 2007
Happy New Year To You All !

I have a php site and would like to upload the same site onto another domain name, while keeping the current site also in it's current domain name.

Does anyone know how I can upload the database - mysql - and duplicate the site ???

Thank you

New Girl.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Solved Threads: 35
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: Uploading current php site to another site.

 
0
  #2
Jan 3rd, 2007
Use mysqldump to create a backup of the database and use mysqlimport to read it into the new database.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 494
Reputation: Puckdropper is an unknown quantity at this point 
Solved Threads: 21
Puckdropper Puckdropper is offline Offline
Posting Pro in Training

Re: Uploading current php site to another site.

 
0
  #3
Jan 4th, 2007
As long as you didn't refer to the absolute URL in the code, all you should need to do is copy the database over.

If you want to use the same database, you can set the server in your MySQL connect statement to the other host. That's how I handle my test environment and test database.
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Solved Threads: 35
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: Uploading current php site to another site.

 
0
  #4
Jan 4th, 2007
FYI, if you are trying to have two different sites available to the public this is a bad idea as Google will hit you with a duplicate content penalty of some sort.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 9
Reputation: loopylouis is an unknown quantity at this point 
Solved Threads: 0
loopylouis loopylouis is offline Offline
Newbie Poster

Re: Uploading current php site to another site.

 
0
  #5
Jan 10th, 2007
If you have 1 site and 2 domain names why not just add the other domain as a 'addon domain' to the server and you can access that 1 copy from both url's

If you want to copy the site to another server then generate a full back-up with mysql-grabs upload the mysql-dump and scripts at the neew server. the only thing you will need to then change/re-create will be the database name and user.


[PHP]$db = mysql_connect("localhost", "USERNAME", "PASSWORD") or Die("No connection establish to database: " . mysql_error());




mysql_select_db("DATABASENAME") or Die("DB Error !");[/PHP]


Hope this helps.
Looking for a host? 50% off web hosting!
coupon code: C94F2 to receive a 50% discount for your first month. www.GreenHostSolutions.com
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC