InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Wordpress How-Tos

  • angularjs in wordpress
  • Convert wordpress page to posts and vice versa
  • Find all user created wordpress custom field keys
  • How to automate wordpress sandbox setup on Linux
  • How to capture php code or included file output in a variable
  • How to check the performance of a plugin using mysql query log
  • How to migrate wordpress from root to sub directory
  • How to upgrade wordpress manually
  • How to view wordpress current version
  • Setup xdebug for remote wordpress debugging
  • Wordpress - disable theme and plugin editing
  • Wordpress - get wpdb class method names
  • Wordpress multisite network vs normal installation
  • display method names from php WP_Query object
  • find if a wordpress page is leaf page
 
  • Home
  • > Tutorials
  • > Wordpress
  • > Wordpress How To

How to check the performance of a plugin using mysql query log

By admin | Last updated on Mar 20, 2016

Installing too many plugins can hurt wordpress blog performance as plugins may lead to more queries. One quick way to check the impact of a plugin on mysql server is to enable the query log on the server.

On linux this can be done by editing /etc/my.cnf (or /etc/mysql/my.cnf) on Linux server.  Here is the addition/change which is needed

log=/var/log/mysql_query.log
(or whatever log file name you want to use)

Restart the mysql server after this. You use this command on linux (centos):
sudo service mysqld restart

You can view the log file using
tail -f /var/log/mysql_query.log

This can be used for:

  1. To find out if a plugin is sending too many queries to mysql database. In case it is behaving badly, you may want to look for alternatives.
  2. It can also help understanding what all tables a plugin is reading and writing. This can used to debug and also to understand data storage structure of a plugin.

Make sure you don’t enable logs in production system permanently. Either you do it on a devel/sandbox setup of do it for a short duration.

Suggested posts:

  1. How to find mysql query rate on Linux
  2. Chrome – copy any request as cURL including headers
  3. How to kill unresponsive ssh session using escape sequence
  4. mysql find recently created-tables
  5. How to install wordpress on Amazon AWS-EC2 Classic Ubuntu Linux micro instance
  6. WordPress – get posts/pages with missing meta key
  7. WordPress themes for beginners worth considering
  8. jQuery – difference between html() and text()
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Tutorials, Wordpress, Wordpress How To
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress