High CPU usage issue WooCommerce site

[ad_1]

I posted this similar issue on reddit before. I contacted Siteground support and this is what they said:
Hi Muhammad,

Here is a link detailing how you can review the Raw Access Logs to learn more about incoming requests:

https://www.siteground.com/kb/find-website-raw-access-logs/

Reviewing the logs, the resource usage is caused by excessive WP-Cron and AJAX executions generated by the website application for (our site)

I suggest you replace WP-Cron with actual Cron jobs, which can be setup as per the following guide:

https://www.siteground.com/tutorials/wordpress/real-cron-job/

Here are links detailing how you can find which components of your web application are responsible for AJAX executions and how they can be reduced:

https://docs.wp-rocket.me/article/985-how-to-find-which-plugin-calls-admin-ajax-php
https://www.webnots.com/fix-slow-page-loading-with-woocommerce-wc-ajaxget_refreshed_fragments/
https://my.siteground.com/support/tutorials/wordpress/limit-heartbeat

Additionally, site is being bombarded with requests from Google and Facebook . We recommend you to drastically reduce the GoogleBot

crawl rate . Here are links that detail how this can be done: https://developers.google.com/search/docs/crawling-indexing/reduce-crawl-rate https://developers.google.com/search/docs/crawling-indexing/pause-online-business https://developers.google.com/search/docs/crawling-indexing/large-site-managing-crawl-budget#improve_crawl_efficiency There is also a lot of traffic from "facebookexternalhit" bots which can be very aggressive. They typically start scraping your site when someone posts a link on Facebook. If you're aware of any ongoing campaigns on Facebook, you may want to temporarily pause them. For more information on their bots, check out their documentation (and/or their support team): http://www.facebook.com/externalhit_uatext.php If you wish to block these bots, you can add the following rules to your websites' .htaccess files :

SetEnvIfNoCase User-agent facebookexternalhit not-allowed=1
Order Allow,Deny
Allow from ALL
Deny from env=not-allowed

Please note that Facebook will no longer be able to scrape your website pages if you do this.

I would recommend carefully reviewing your website apps settings to reduce resource usage as quickly as possible.

So, can anyone help me with how exactly I can fix these issues on my site?

[ad_2]
1 Comment
  1. I mean they gave you a comprehensive set of steps to follow. Just read the linked articles and start implementing them one by one. Take full backups before changing anything.

 

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