How to know if you have too many WordPress plugins

Many bloggers who using WordPress were facing a major problem, website slow. Sometimes, this could be a problem from the WordPress application itself instead of the hosting server.

WordPress is designed to be able to use custom plugins or themes. If you simply install the untrusted plugins or themes, it will indirectly causing your website slow.

So you shall not install the unused plugins. If you did it, uninstall it instead of deactivated it as deactivated will still causing the SQL query to query it from the wp_options tables from your database.

Watch your website load time. If your site couldn’t loaded within 5 seconds and where this might caused by the low quality plugins installed.

Check the plugins compatible from the plugins page from URL below,

Check the query time,  add the following code to your footer.php and check your site query number and time.

<?php echo $wpdb->num_queries; ?>
<?php _e('queries'); ?>. <?php timer_stop(1); ?> <?php _e('seconds'); ?>

Then try to disable the plugin 1 by 1 or even remove them and test the query time. Otherwise, optimize the database to cleat the overhead data.

Identify slow MySQL query

Sometimes, MySQL will make your server pain if you have user abusing it. Mick Genie will teach you to identify which MySQL database creating the problem to your server.

Actually MySQL can log all of the those query that taking longer time than certain seconds.

1. Login to the server as root.
2. Open your my.cnf with your editor.

vi /etc/my.cnf

3. In the [mysqld] section, add the line as below.

log-slow-queries = /var/log/mysql-slow.log
long_query_time = 3

this meant that the log will logged to /var/log/mysql-slow.log and the query time is 3 seconds.

4. Save the my.cnf by typing “:wq!” and press enter.
Continue reading Identify slow MySQL query