944,101 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1658
  • PHP RSS
Jan 3rd, 2007
0

Uploading current php site to another site.

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
new_girl is offline Offline
5 posts
since Oct 2006
Jan 3rd, 2007
0

Re: Uploading current php site to another site.

Use mysqldump to create a backup of the database and use mysqlimport to read it into the new database.
Moderator
Reputation Points: 161
Solved Threads: 38
He's No Good To Me Dead
stymiee is offline Offline
1,422 posts
since May 2006
Jan 4th, 2007
0

Re: Uploading current php site to another site.

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.
Reputation Points: 23
Solved Threads: 23
Posting Pro in Training
Puckdropper is offline Offline
494 posts
since Jul 2004
Jan 4th, 2007
0

Re: Uploading current php site to another site.

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.
Moderator
Reputation Points: 161
Solved Threads: 38
He's No Good To Me Dead
stymiee is offline Offline
1,422 posts
since May 2006
Jan 10th, 2007
0

Re: Uploading current php site to another site.

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
loopylouis is offline Offline
9 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Problem with two small PHP scripts?
Next Thread in PHP Forum Timeline: Script to do a form submition to e-mail.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC