What is the filename (including path) of a WordPress database?
Sebastian Wright
I have local Wordpress database that got corrupt as a result of an abrupt power outage (I wasn't even editing it!).
Since the system I am dealing with is pretty static (and old), I just want to restore that database file (or collection of files) from a nightly backup.
But I don't know which files I should be restoring. The WordPress blog in question is installed under a local user account in an old Linux server (FC4).
I checked the wp-content directory, but apparently this is not where the content is:
~/public_html/wordpress/wp-content> ls -l
total 24
-rw-r--r-- 1 ww4s ww4s 32 Nov 18 2005 index.php
drwxr-xr-x 3 ww4s ww4s 4096 Jun 2 2006 plugins
drwxr-xr-x 4 ww4s ww4s 4096 Mar 10 2006 themesAny idea which file(s) I should be restoring and what their path is?
1 Answer
WordPress is almost certainly using a MySQL database for storing its content, and those are usually stored elsewhere on the system, often /var/lib/mysql/some_db_name. Open up your wp-config.php file and start looking at your MySQL settings. These should help you figure out your environment and where to look next. You can see a sample wp-config.php file here.