New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

Server

How to fix WordPress high CPU usage

Your host emails about CPU limits or the site returns 503 during traffic spikes. WordPress high CPU usage rarely fixes itself. It comes from uncached requests, runaway cron, brute force login attempts, or one expensive plugin query on every page.

Time: 30-60 minutes Level: Advanced

What this problem looks like

CPU usage is requests times cost per request. Cutting either lowers load. Full-page cache slashes PHP executions for anonymous visitors. Fixing one plugin that runs ten SQL queries per page helps everyone.

xmlrpc.php, wp-cron.php, and admin-ajax.php are common attack and abuse endpoints that spike CPU on unsecured sites.

Blocking wp-cron entirely without real system cron stops updates and WooCommerce webhooks. Replace with server cron, do not only disable.

Read hosting metrics

Identify whether spikes are sustained or burst. Bursts at the hour mark suggest cron. Constant high CPU with low traffic suggests search engine crawl misconfiguration or malware.

Secure and cache public traffic

  • Enable full-page cache for anonymous users.
  • Use Cloudflare or host WAF to rate limit wp-login.php.
  • Disable xmlrpc if unused: add filter or security plugin toggle.
  • Block aggressive bots in robots.txt and firewall when legitimate.
php
add_filter( 'xmlrpc_enabled', '__return_false' );

Fix WP-Cron properly

Disable default wp-cron trigger and use system cron to call wp-cron.php every five minutes.

Add crontab entry: */5 * * * * curl -s https://yoursite.co.uk/wp-cron.php?doing_wp_cron >/dev/null 2>&1

php
define( 'DISABLE_WP_CRON', true );

Action Scheduler backlog

WooCommerce and Subscriptions queue thousands of actions. Failed or pending queues retry and burn CPU. Clear completed actions and fix stuck hooks.

bash
wp action-scheduler run
wp action-scheduler clean --status=complete

Plugin and query offenders

Related posts plugins, statistic widgets, and live visitor counters query on every page load. Replace with static blocks or server-side analytics. Query Monitor reveals plugins attaching to init with remote HTTP calls.

When to stop DIY and hire help

CPU pegged after malware scan, DDoS, or unknown cron jobs needs incident response. BugShield finds WordPress CPU bottlenecks and hardens shops against repeat spikes.

FAQs

Why does WordPress CPU spike at night?

Scheduled backups, cron tasks, or overseas bot traffic while EU traffic is low. Check cron and access logs for those hours.

Will upgrading hosting fix high CPU?

Temporarily yes. Without fixing root cause, you only buy headroom until load grows again.

Can WooCommerce cause high CPU?

Yes. Uncached shop pages, session handling, and large Action Scheduler queues are common on busy stores.

Should I disable wp-cron on WooCommerce?

Disable the visit-triggered scheduler only if you configure real system cron to replace it.

Rather someone else fixed it?

Request a fix at a confirmed price. Named UK developer, secure Vault, direct chat.

Request a Fix