admin管理员组

文章数量:1323195

There are many threads talking about managing database of WordPress via phpMyAdmin. But surprisingly, not many threads show where these files exactly are in the server.

There is a thread here: Database location in WordPress, but I'm not sure my website is using XAMPP.

Could anyone tell me where are the files related to database, and their path and filename in the server?

There are many threads talking about managing database of WordPress via phpMyAdmin. But surprisingly, not many threads show where these files exactly are in the server.

There is a thread here: Database location in WordPress, but I'm not sure my website is using XAMPP.

Could anyone tell me where are the files related to database, and their path and filename in the server?

Share Improve this question asked Sep 11, 2020 at 19:25 SoftTimurSoftTimur 1091 silver badge5 bronze badges 1
  • Upped this question because of issues transferring providers where the source does not permit export of backup files, but of the sql db. The destination is a CPanel outfit, where a copy of the WP files is no issue - just the sql DBs. Research into the inner workings is likely incomplete, however. – Laurie Stearn Commented Nov 16, 2023 at 9:41
Add a comment  | 

1 Answer 1

Reset to default 2

But surprisingly, not many threads show where these files exactly are in the server.

WordPress doesn't have files it manages, it instead relies on MySQL/MariaDB for database storage and execution. So you will not find the database stored as a file within a WordPress installation.

If you need to handle 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.

So Where Is The Data?

They would be in a system folder as specified by the MariaDB/MySQL configuration. This varies depending on the distribution and hosting provider. These files are not intended to be used modified or accessed 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?

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. Instead rely on SQL files.

本文标签: Where are database files of a WordPress website