In Shared hosting, Nowadays High CPU usage is a common problem at WordPress site. At WordPress site, we have used so many plugins which are required to install or uninstall time to time. For that reason, so many MySql queries and PHP files are running on the website.
Here we are talking what may create this problem and how to solve this.
Lists of the reason how to create High CPU usage problem:
- High-traffic WordPress website
- Plugins installed which are resource consuming
- Hacked hosting account
- Buggy WordPress plugin or a PHP script
- Real-time stats collector plugins
- High number of online visitors
- Self-hosted Media streaming
- Longer duration Simultaneous download connections
- Running frequent and long run cron jobs
- WordPress Heartbeat API
To reduce High CPU usage problem we should follow these step:
Step 1:
Installed “Advanced Database Cleaner pro” plugin. It is a premium plugin. Free plugin is not working properly.
Advantages
Advanced Database Cleaner Pro will optimize your website and clean-up database junk. By using Advanced Database Cleaner Pro we can use these service which are ,standard clean-up, schedule clean-up, view items before clean-up, optimize Database, Schedule optimization, view & clean cron tasks, view & clean options, view & clean tables, detect orphan cron tasks, detect orphan options, detect orphan tables, supporting Multisite.
Step 2:
Installed W3 Total Cache plugin
Advantages
Page speed is important for the user-friendly experience.W3 Total Cache plugin can cut 90% load time.
Step 3
Installed P3 Profiler plugin.
Advantages
This plugin helps you to find out the required plugin which is slowing down your site and also creates a profile of your WordPress site’s plugins’ performance by measuring their impact on your site’s load time.
Step 4:
Installed Sucuri plugin
Advantages
The Sucuri plugin provides the best Audit logging, SiteCheck Remote Malware Scanning, Effective Security Hardening and Post-Hack features. SiteCheck will check for malware, spam, blacklisting and other security issues like .htaccess redirects, hidden eval code, etc. This plugin scans your website and tells you about possibilities whether your blog is hacked.
Step 5
Installed “Backup Buddy” plugin
Advantages
To generate a backup of your website you can use this plugin. It also helps you to control excessive run of cron jobs and schedule them at that time when Hosting server is least busy.
Step 6
Installed Heartbeat Control plugin.
Advantages
By using Heartbeat Control plugin, WordPress automatically communicates between the web browser and the server.
Step 7:
We have to follow these requirements for e-commerce website which are given below:
- 2GB physical RAM,
- Up to 2 CPU cores burstable up to 100% usage.
Step 8:
Don’t use any tracking plugin installed that collects traffic information from the website. It may cause high load on the database server. We have to replace that plugin with external hackers such as Histats, Google Analytics, Sitemeter etc.
Step 9:
You should buy VPS hosting for Media streaming as it is against terms of conditions of all shared hosting providers.
Step 10:
Shared hosting can bear up to 3k – 4k visitors per day with the W3 total cache plugin. If your traffic goes up, should consider buying Managed WordPress hosting or VPS.
Step 11:
For Longer duration, Simultaneous download connections should Shifting downloads to 3rd party storage websites like Dropbox, Google Drive.
Other twist
CloudFlare
CloudFlare is free Basic CDN service which helps your websites load perfectly and handle some CPU load. It also prevents DDoS attacks on your Website.
External commenting system
Most of the blogs get thousands of spam comments that causes heavy load on the database server. It is better to use a 3rd party commenting system. Disqus is the most used amongst bloggers and website owners.