0

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.

4
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by loopylouis
0

Use mysqldump to create a backup of the database and use mysqlimport to read it into the new database.

0

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.

0

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.

0

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.

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




mysql_select_db("DATABASENAME") or Die("DB Error !");

Hope this helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.