• Home
  • đź§­ Step-by-Step: Identify If a WordPress Plugin Is Causing High CPU Load

đź§­ Step-by-Step: Identify If a WordPress Plugin Is Causing High CPU Load

wordpress_troubleshoot
by:admin July 19, 2025 0 Comments

âś… 1. Use the Query Monitor Plugin (The Sherlock of WP)

Install from wp-admin:

  • Go to Plugins → Add New
  • Search: Query Monitor
  • Activate it

Then:

  • Visit your frontend and admin pages
  • You’ll see a Query Monitor bar showing:
    • Slowest queries
    • Plugins responsible for them
    • REST API calls
    • Hooks or AJAX running slow

⚠️ Important: Use it during traffic or load spike hours if possible.


âś… 2. Use WP-CLI to Profile Plugins (CLI-style Diagnosis)

Install WP-CLI if not present:

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp

Navigate to your WordPress root:

cd /home/{User}/public_html

Then check plugin status:

wp plugin list --fields=name,status,update

Now disable ALL plugins temporarily:

wp plugin deactivate --all

Test site. If the CPU/memory load drops:
➡️ Yes! A plugin is causing the problem.

Now re-enable one by one:

wp plugin activate plugin-name

Monitor after each activation.


âś… 3. Temporarily Rename the Plugins Folder (Emergency Mode)

Go to:

cd /home/{User}/public_html/wp-content/
mv plugins plugins_backup
mkdir plugins

Reload your site. If it loads blank/basic and load drops — it was plugin-related.

To restore:

rm -rf plugins
mv plugins_backup plugins

âś… 4. Check for Plugins That:

  • Use cron (newsletter, backup, sync)
  • Send API requests (analytics, social feeds)
  • Create shortcodes that query DB heavily
  • Call external scripts (chatbots, forms)

Some frequent offenders:

Plugin TypeRisky Examples
Page BuildersElementor (with complex widgets)
BackupsUpdraftPlus, BackWPup (if set hourly)
SecurityWordfence (with live traffic scan)
SEORank Math (if auto-crawling enabled)
EmailMailPoet, Newsletter (on auto-send)
StatsJetpack, MonsterInsights

🔥 Ultimate Trick: Enable WP Debug Log to Trace Requests

Edit wp-config.php:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Then check:

tail -f /home/{User}/public_html/wp-content/debug.log

This can reveal PHP warnings or notices from faulty plugins.


đź§  Recommendation Summary

TaskBenefit
Use Query MonitorShows slowest plugin/query
Use WP-CLIDisable/enable to isolate offender
Rename plugins dirQuick diagnosis
Check debug.logSee background errors
Use server logsCombine with /var/log/httpd/access_log

Categories:

Leave Comment