High CPU Usage and Response Time Increase

[ad_1]

Heya, I am using WordPress in my website and yesterday, I started to experience high cpu usage which causes an increase in all of my subpages' loading time. When I click to any menu or subpage, it loads for long amount of time. I uninstalled all unnecessary plugins but still, the same problem occurs. What can I do?

[ad_2]
5 Comments
  1. I hope these below steps could help you out, to take care of the possible internal and external causes of your servers’ resources problems (I had problems with both causes on my SiteGround hosting, but managed to solve them all):

    – check for any malicious activity on the site: malware, virus, etc.: [https://www.wpbeginner.com/plugins/how-to-scan-your-wordpress-site-for-potentially-malicious-code/](https://www.wpbeginner.com/plugins/how-to-scan-your-wordpress-site-for-potentially-malicious-code/)

    [https://wordpress.org/plugins/wp-security-audit-log/](https://wordpress.org/plugins/wp-security-audit-log/) (important for checking out who does what on your site… and when)

    – install high quality Security Tool with WAF (Web Application Firewall) built in it in order to protect against possible DDOS attacks: be careful when you do massive promotions with random parameters in the URL like umm-source=mail&id=1238 as that’s a great way to successfully DDoS your site and exhaust all its limitations: [https://www.wpbeginner.com/plugins/best-wordpress-firewall-plugins-compared/](https://www.wpbeginner.com/plugins/best-wordpress-firewall-plugins-compared/)

    – install CloudFilt application or StopBadBots plugin but be careful as one person reported that this plugin caused errors on his site (backup your site before installation): [https://www.isitwp.com/stop-brute-force-attacks-wordpress-website/](https://www.isitwp.com/stop-brute-force-attacks-wordpress-website/)

    – look at your usage and see what is draining the most resources (check some resource-heavy functions): backup plugins, security scanners, broken link checkers, custom scripts, slow MySQL queries, self-referring requests, etc. via a Query Monitor plugin ([https://wordpress.org/plugins/query-monitor/](https://wordpress.org/plugins/query-monitor/)). You will be able to see all of the processes being queried on your websites’ pages (check the admin bar). In case of any issues, you will see some items in red. Know ALL the plugins you have installed on the site, but more importantly: what do they do, how do they do it and how often they do it: [https://www.wpbeginner.com/plugins/how-to-add-a-wordpress-query-monitor-on-your-site/](https://www.wpbeginner.com/plugins/how-to-add-a-wordpress-query-monitor-on-your-site/)
    E.g. if you are using Yoast SEO, turn off the “word recommendations” feature that works in the background

    – check if some plugins have conflict(s) between themselves / perform troubleshooting process: [https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/](https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/)

    – better setup of your caching plugin

    – increase your website’s PHP version: [https://www.wpbeginner.com/wp-tutorials/how-to-update-your-php-version-in-wordpress-the-right-way/](https://www.wpbeginner.com/wp-tutorials/how-to-update-your-php-version-in-wordpress-the-right-way/)

    – decrease your website’s WP heartbeat: [https://www.wpbeginner.com/plugins/how-to-limit-heartbeat-api-in-wordpress/](https://www.wpbeginner.com/plugins/how-to-limit-heartbeat-api-in-wordpress/)

    – don’t open many website’s admin tabs at the same time (if the heartbeat of the site is not set properly, it’s going to open a lot of process)

    – be careful using page editors, as they can constantly drain your resources while editing and updating pages (make sure you only edit one page at a time and try not to have multiple pages in edit mode open in multiple tabs)

    – disable xmlrpc.php: [https://www.wpbeginner.com/plugins/how-to-disable-xml-rpc-in-wordpress/](https://www.wpbeginner.com/plugins/how-to-disable-xml-rpc-in-wordpress/)

    – reinstall your WordPress Core (this did help some users): [https://www.wpbeginner.com/wp-tutorials/how-to-uninstall-and-reinstall-wordpress/](https://www.wpbeginner.com/wp-tutorials/how-to-uninstall-and-reinstall-wordpress/)

    – remove/disable WP-CRON and set a manual request – real cron jobs (on Cloud server): [https://www.wpbeginner.com/wp-tutorials/how-to-disable-wp-cron-in-wordpress-and-set-up-proper-cron-jobs/](https://www.wpbeginner.com/wp-tutorials/how-to-disable-wp-cron-in-wordpress-and-set-up-proper-cron-jobs/)

    – enable AutoScale (on Cloud server)

    – ask the Hosting’s Support to increase the connection limits (on Cloud server)

    PS Before making any changes to your site, including deactivating/installing the new plugins, updating existing plugins/theme, testing snippets/code, … you should first backup your site to be on the safe side: [https://www.fixrunner.com/best-wordpress-backup-plugins/](https://www.fixrunner.com/best-wordpress-backup-plugins/) (I use All in one WP migration plugin).

  2. If you’re able to, check your Apache access log. Crawlers can frequently overwhelm WP if it has a lot of pages by making multiple simultaneous requests.

    For example, I had to reach out to Pinterest at one point because they were crawling my site with over 20 requests per second from 5 different IPs. It pegged my CPU at 99% and even prevented me from SSHing in.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer