Did you make a backup of the file before editing it? Do you have a recent backup of your complete site? If so, simply replace the corrupted wp-config.php with your backed up one.
If not, do you know your database host, name, user and password. If so, delete wp-config.php (the required details may actually be in that file). Replace it with wp-config-sample.php from a freshly downloaded WordPress archive and rename it to wp-config.php. Upload to your site and simply visit your site in a browser. Fill in the details, WordPress will tell you the site is already installed but will start to work again. Hopefully π
Thank you for this help. I believe that your suggestion will work. I just have one more problem. I run multiple wordpress blogs (total of 4), but there are 7 databases on my server. I have identified the other 3 databases to their blogs (my provider doesn’t show name or date created, just the db #). Apart from wp-config.php, are there any other wordpress files that would indicate the which database number I am looking at?
Thanks!
If you can use phpmyadmin at your host, access the database server using that and look at the first row in wp_options for each of the databases. It should contain your site URL.
Thanks. Slowly making progress.
I followed the directions on http://codex.wordpress.org/Editing_wp-config.php#Set_Database_Host and got this error message when loading the page now:
“Parse error: syntax error, unexpected T_LNUMBER in /homepages/34/d313238537/htdocs/49erna/wp-config.php on line 16”
Trouble is, my new wp-config.php has nothing on line 16??
Help?
Take your wp-config file, replace sensitive details like passwords with XXXX and then post it to pastebin.com. Then put the link in here.
[Link redacted – Please try to avoid publishing any of your database credentials on the internet]
Are those line numbers actually in the file (they shouldn’t be).
OK, they need to be removed.
OK removed the line #’s and the problem has been solved regarding wp-config.php.
I appear to have a problem still of being able to log in because i changed the URI. Where should I play around?
Phpmyadmin –> wp_options table. Row 1 , siteurl. Row 36 (ish) home.
Thanks, found it. Row 37 actually π
Everything there is as it should be (home and site URL are set to the same thing).
My problem is two-fold though:
1) I still can’t login via wp-login
2) The content of the site is there, but all the WordPress formatting is gone
Help?
Thanks!
ALL FIXED. Typo in siteurl.
Sorry for any hassle!