How to Fix High CPU Usage on WordPress

Few days ago I got complain from my hosting company that my website which is WordPress produced high CPU usage all the time.

Below are what I’ve done to fix the problem:

  1. I disabled all plugins in WordPress. Result: failed.
  2. I switched to default twenty-ten WordPress themes while still disabled all plugins. Result: failed.
  3. I logged in to CPanel and opened phpmyadmin to check WordPress tables. I found wp_options table got 16MB in size. I removed some entries in that table and made it slim to 1MB size. I removed all revision posts. Result: success.

Now CPU utilization is decreased.

Actually what I’ve deleted were some entries created by Google Analytic Dashboard and Social Discussion plugins. Because of this problem, I am not using these two plugins anymore.

Example of query:

DELETE FROM wp_options WHERE option_name like 'gad_%'

Instead of manually deleted the entries, you can use Clean Options plugin to delete orphaned wp_options entries.

Another thing is to remove revision posts. I use Better Delete Revision plugin and I managed to delete 2800+ revision posts and made WordPress database slimmer.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.