| | |
Uploading current php site to another site.
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
•
•
Join Date: Jul 2004
Posts: 494
Reputation:
Solved Threads: 21
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.
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.
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.
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!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
•
•
Join Date: Jan 2007
Posts: 9
Reputation:
Solved Threads: 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.
[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.
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
coupon code: C94F2 to receive a 50% discount for your first month. www.GreenHostSolutions.com
![]() |
Similar Threads
- Please review my PHP-site (Website Reviews)
- pasting adsense code in php site (Pay-Per-Click Advertising)
- Get the name of the current php file (PHP)
Other Threads in the PHP Forum
- Previous Thread: Problem with two small PHP scripts?
- Next Thread: Script to do a form submition to e-mail.
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email encode error fcc file files folder form forms function functions google howtowriteathesis href htaccess html image images include insert integration ip java javascript joomla ldap limit link login loop mail menu methods mlm mod_rewrite multiple mysql oop open parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table template tutorial update upload url validation validator variable video web xml youtube






