But surprisingly, not many threads show where these files exactly are in the server.
This is because these files are not very useful, and of little practical use or consequence.
WordPress communicates with a database using SQL queries, usually via the Mysqli extension. So WordPress itself does notdoesn't have database files. As for it manages, it instead relies on MySQL/MariaDB, they have complex data for database storage mechanisms that can vary based on configurationand execution.
The files themselves can only be used by So you will not find the database software, are not designed for external tools to use, and can't be used for reliable backupsstored as a file within a WordPress installation.
If you need to get the data inside ahandle database data in a file format, you should dump/export it into SQL files. These files are the commands needed to recreate the database, its tables, and their contents. The actual files of the database are of no practical use.
Where Would They BeSo Where Is The Data?
They could be anywhere! Database storage location canwould be redirected to anyin a system folder onas specified by the system viaMariaDB/MySQL configuration. It could even beThis varies depending on a different machine! Yourthe distribution and hosting provider will know where this is, but it is of no practical use to you.
However, you're extremely unlikely These files are not intended to find them in user home folders,be used modified or in the same folders as your websiteaccessed by users directly.
There is a thread here: Database location in WordPress, but I'm not sure my website is using XAMPP.
XAMPP is a local dev environment that provides Apache + PHP + MySQL.
What About Backups?
Almost useless. You shouldn't try to back up these files and restore them. Doing it properly would mean shutting down the database server, and taking a snapshot of the entire environment.
Or, just doing a standard database export using the appropriate commands, usually mysqldump
, or using a tool or plugin Instead rely on SQL files.