I have a localhost site that I heard I can migrate the site by just copy and paste the whole site from local to host if I changed WordPress Address (URL) and Site Address (URL) to my current hosted site address and then upload it to the host. Now my hosting server's site after pasted with my local host site seem sql db is broken...it only shows: "Error establishing a database connection", Do you know how to fix it?
You've only moved the PHP files. That is only part of the process.
Migrating the databse would mean:
That is the hard way, but your attachments are likely to survive. You could have trouble if the MySQL versions between you local install and your host are different.
The easier way is this.
The benefit is that the database is clean and fitted to your new host. The drawback is this: While the importer will offer to download and install your attachments, it won't be able to do so from a "local" address.
While I have done and it does work, I prefer the latter, for what it is worth.
Caveat: I cannot swear that I've remembered everything you will need to do. Go through the Codex page very carefully before doing anything.
|show 1 more comment|
You have to open the wp-config.php, located in your WordPress root directory, and then modify the options
This will make the message to disapear. In order to get more information on WordPress migration read the http://codex.wordpress.org/Moving_WordPress#When_Your_Domain_Name_or_URLs_Change