{"id":25930,"date":"2020-12-21T02:55:22","date_gmt":"2020-12-20T18:55:22","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&p=25930"},"modified":"2022-09-08T21:26:10","modified_gmt":"2022-09-08T13:26:10","slug":"how-to-fix-high-cpu-usage-in-wordpress","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/how-to-fix-high-cpu-usage-in-wordpress","title":{"rendered":"HOW TO: Fix High CPU usage in WordPress"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

HOW TO: Fix High CPU usage in WordPress\n<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

By reading this article, you will learn to solve the problem of having high CPU usage in WordPress on your own. Besides, you can check out our Hosting services<\/a> for more information. There are several ways that we recommend you to use:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

1. Update WordPress<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

If you\u2019re not using the latest version of WordPress\u00a0update now<\/a>. Make sure you backup your site first!<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

2. Update Plugins<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Updating your WordPress plugins to the latest versions can often reduce high CPU usage. If you\u2019re running an old version take a moment to update now.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

3. Avoid beta versions of plugins<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Whilst it\u2019s cool to be at the cutting-edge, only use stable versions of WordPress plugins. Sometimes early release versions (also known as alpha or beta) can have bugs in the code which can cause CPU spikes.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

4. Install a caching plugin<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Caching plugins such as\u00a0W3 Total Cache<\/a>\u00a0and\u00a0WP Super Cache<\/a> can dramatically reduce CPU load by caching static copies of your pages on your webspace. Static files use less CPU and memory. Keeping you within your shared hosting limits.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

5. Disable WP-Cron<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

WP-Cron manages all the scheduled events on your WordPress site. WP-Cron is a very<\/em> common cause of high CPU loads as it is called every time someone visits your website.\u00a0Disabling WP-Cron and replacing it with a real cron\u00a0job can drastically reduce CPU-load and prevent the chances your account is suspended due to exceeding your resources.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

6. Only use plugins you\u00a0really\u00a0need<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Do you really need that plugin that constantly checks for broken links? \u2013 The more WordPress plugins you have installed, the longer your site will take to load. Deactivate and delete any plugin that you don\u2019t need. Aim for just a handful of plugins. This will speed up your site and keep your visitors happy.<\/p>

If you\u2019ve disabled plugins you don\u2019t need, and still have high CPU usage you\u2019ll need to try debugging each plugin to see if it\u2019s the cause of the CPU spike. First make sure you\u2019ve taken a backup of your entire WordPress site (files and database). Now try disabling each plugin one by one until the CPU load has been resolved. Once you\u2019ve found the faulty plugin you should hopefully be able to reenable the others without seeing the CPU problems.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

7. Avoid resource-hungry plugins<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

If using WooCommerce, or similar resource-hungry plugins, make sure your web hosting has sufficient resources.<\/p>

If you\u2019re running CPU and Memory intensive plugins on a standard shared-hosting, or budget VPS hosting you may find your site performs badly due to insufficient server resources. Symptoms include slow loading pages, database errors and increased visitor abandonment.<\/p>

With many web hosts, if you try running CPU intensive WordPress plugins on a shared-hosting package you risk your site being suspended due to high-CPU loads.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

8. Avoid buggy WordPress Themes<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

A badly written WordPress Theme or one written with demanding features such as server-side image resizing can be CPU intensive. To rule out problems with your WordPress theme try the following:<\/p>