admin管理员组

文章数量:1304889

With a default Wordpress install, with no plugin installed, does the read-only visiting of the website generates write operations in the database? By read-only, I mean: visitors come and don't post user-submitted contents (like comments, etc.)

If so, which data is written, and in which database table?

(When using for example Apache, logs age written directly in /var/log/apache2/*.log, and I guess Wordpress doesn't do a second layer of logging into the MySQL database, or does it?)

With a default Wordpress install, with no plugin installed, does the read-only visiting of the website generates write operations in the database? By read-only, I mean: visitors come and don't post user-submitted contents (like comments, etc.)

If so, which data is written, and in which database table?

(When using for example Apache, logs age written directly in /var/log/apache2/*.log, and I guess Wordpress doesn't do a second layer of logging into the MySQL database, or does it?)

Share Improve this question asked Jan 28, 2021 at 10:44 BasjBasj 8510 bronze badges 2
  • Can I ask why you are asking this? What's the context behind it – Tom J Nowell Commented Jan 28, 2021 at 13:26
  • 1 @TomJNowell I saw the database growing along the years, not really knowing why. But this SQL command gave me the answer: it was the spam comments in wp_comments and wp_commentmeta: SELECT table_schema as `Database`, table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` FROM information_schema.TABLES ORDER BY (data_length + index_length) DESC LIMIT 10; – Basj Commented Jan 28, 2021 at 13:29
Add a comment  | 

2 Answers 2

Reset to default 2

I think WP out-of-the-box does not write or store any data for non-logged in users.

WP - again by default - does not write log files, that is an optional config defined in the wp-config.php file.

For a logged out user on a stock install of WordPress? No.

For a logged in user? Yes, their user session meta will be updated, and WordPress may check for updates and store the result as options/transients.

However there is no "logging" to the database, and no logs table.

WordPress also won't log to a file. If WP_DEBUG_LOG is defined it will redirect PHP errors and notice messages to wp-content/debug.log, but this must be turned on in the wp-config.php file.

As or themes and plugins? You would need to contact the authors/developers.

If you are looking for activity logs, audit trails, visitor statistics, access logs, WordPress does not have these. You would need to install a plugin that provides them.

本文标签: