Error establishing a database connection


#1

I recently started a website on a subdomain, than switched it over to my main domain by changing the url in the wordpress login than renamed the folder in ftp. Worked fine. I suspect I may have somehow broken some files I couldn’t see when I deleted the old development subdomain folder under my ftp today?? How can I fix this?


#2

Velvet Blues URL Updater http://wordpress.org/plugins/velvet-blues-update-urls/

But that depends on how far along you are. Can you log into WordPress (on your main domain?)
If so, installing that plugin, and then running it should fix a lot of broken urls

Also, you might navigate to http://yourdomain.com/wp-admin/options.php and check that everything is set for your main domain.


#3

If you’re comfortable on the command line, we have WP-CLI, which has my absolutely favorite tool ever.

wp search-replace olddomain.com newdomain.com --dry-run

Just remove --dry-run when you’re ready to do it for reals.