And is your original wp-config.php still there in the WP directory?
Hi HandySolo. No, my original wp-config.php is not still inside my WP directory. I re-uploaded a new set of files, and deleted the old set, and I guess I inadvertently deleted the wp-config.php file. Ouch.
When I log into Cpanel, I have a “MySQL databases” option. I’ve got “username_wrdp1.” Am I correct in assuming that “username” is my username and “wrdp1” is the database name?
Assuming this, I opened up the wp-config.php file and inserted my password, username, and database name and uploaded the new wp-config.php file. I’m still seeing the same error message and cannot access my domain. What now? Why didn’t that work?
I’ve got a “Repair Database” option under MySQL. If I click “Repair” will that solve the problem, or will that make matters worse?
Never mind. I solved the problem. (It just nearly gave me heart failure for the past 10 minutes, though!) There were 2 problems with my edits to the wp-config.php file…
1.) I had the wrong password. As soon as I changed the password, and reuploaded the config file, I saw a different error message (about the name of the database).
2.) On my host, the name of the database is username_dbname. Not “dbname”. WordPress suggested that this might be the problem. Thank God for clear error messages!
Problem solved. So happy now! Any idea why WordPress saved my posts–even though the config file had been overwritten? I’m very glad WP saved my posts, but I don’t understand why it did so.
Repairing won’t get you anywhere, alas.
Username is probably, as you guess, username. For dbname I’d try the whole thing (username_wrdp1). Or “wordpress” which is the default.
Also in the config file is the table prefix. Default is “wp_” — peeking in the db via cpanel should help you confirm if that’s correct or not.
Ah, good deal. We crossed posts.
Your blog posts were saved because you smoked the WP code, but not the database. 🙂
Ok, thanks HandySolo. So, just to make sure I understand this…my posts were saved b/c I still had the MySQL database intact. Is that right?
If that’s the case, then I never have to worry about overwriting the wp-config file…as long as I still have the MySQL database intact, then all my posts (and theme styles) will be saved.
Yes?
Mostly yes.
Posts (and Pages) and users and comments – database.
WordPress, the program, themes and plugins – file system.