Now the MySQL default query cache is disabled, as I remember long time ago, the hit rate of MySQL is quite high when running WordPress.
So I am thinking if enable it now will improve performance, anyone tried?
Now the MySQL default query cache is disabled, as I remember long time ago, the hit rate of MySQL is quite high when running WordPress.
So I am thinking if enable it now will improve performance, anyone tried?
General speaking yes for read-only applications (until MySQL 5.7, it's deprecated since version 8.0), it enables equal SELECT
s to return data extremely fast if identical calls are already stored in cache. You should consider that:
WHERE
expressions);Excellent alternatives are:
I think also if you combine those with a good web server like NGINX or Apache2 and an HTTP accelerator like Varnish you can fly.
As I know, these are also the best current practices but I might have ignored something, please share it in case.
MySQL's query cache was never much good and has been retired since version 8.0 So, if you're looking for optimizing database performance with WordPress, that's not the way to go. WP does have a tendency to bloat the database, however. There are several things you can do to prevent this.
define( ‘WP_POST_REVISIONS’, 2 );
in wp-config.php
. Or stop revisions alltogether with define( ‘WP_POST_REVISIONS’, false );
In phpMyAdmin you can delete existing revisions with DELETE FROM wp_posts WHERE post_type = "revision";
.