WordPress is the best and most recommended blogging platform that is being used and liked by millions of bloggers. I am also using WordPress since the last 3 years and I am really satisfied with its features and working.
Recently, I have faced High CPU Resource Usage problem on my WordPress blogs and that also caused downtime of ARWebZone for some hours. I have hosted ARWebZone on Hostgator shared servers and everything was working fine since last 7 months. The email I got from Hostgator was indicating that my blog had used more than 25% of CPU resources of their shared servers and then they temporarily disabled my account.
After contacting the support team, searching on Google and doing my own analysis, finally I succeeded in reducing the High CPU Usage of my WordPress blog.
So, here I am going to share some tips that will help WordPress users to reduce the High CPU usage. Hopefully this will help a lot for the smooth running of your blog.
Some Effective Tips to Reduce WordPress High CPU Resources Usage
Resouces Used by Plugins
- Some WordPress plugins are the main cause of this problem. In my case, this was the problem as I was using 15-20 WordPress plugins that time including JetPack by wordpress.com , Pretty Link Manager, WP External Links etc.
- Here comes the question how to get idea that which plugin is affecting the server? This is also pretty much simple. Read the email which you get from the Hosting Company and that will contain info like which file takes long time to process etc. In my case the admin-ajax.php file was consuming major resources and therefore I disabled an ajax powered plugin.
- Second option is to install P3 Profiler plugin (download) for WordPress and that will provide you information regarding which plugin is using how much of server resources. Accordingly you can disable those plugins or install an alternative to those plugins.
- Some plugins also use cronjobs to perform a specific task automatically after specified time. Those plugins also affect the website performance as well as consume high CPU resources.
Selection of Theme
- Resource usage greatly depends upon the theme which you are using. A theme that with ajax styling will certainly eat up more CPU resources.
- Also if the theme serves resized images instead of the actual width and dimension then it will also contribute to more CPU resource usage.
- In my Minimalist WordPress theme, the pretty photo feature was enabled and that was the main root cause of increased usage of server resources and after disabling that feature, the results were better.
- Using minimum number of widgets on your WordPress blog will also help out to reduce High CPU usage.
Brute Force Attacks
When I contacted Hostgator for the solution of this problem then after going through the details, they suggested me to password protect my admin dashboard. So, by securing wp-admin.php with an additional login system, the usage of WordPress core files that are required for Logging to Dashboard can be reduced. Click here to read how to Password Protect WordPress admin directory.
- Contact your Web Hosting Company for the possible solution.
- See which files are consuming more server resources and if it’s a plugin file then disable that plugin or if it’s a theme file then it’s time to change your WordPress Theme.
- The plugins which track visitors, like statspress, Google Analytics by WordPress etc. are the main cause of this problem. It is recommended to manually embed Google Analytics code for tracking (without plugin) and disable all others stats tracking plugins.
- Use P3 Plugin profiler to get complete information about resource usage of your blog.
- Optimize Your Database with Optimize DB plugin (download).
- Use Lazy Load Plugin (download) and that will help a lot to reduce bandwidth as well as High CPU resource usage.
- Use a good WordPress caching plugin for better website performance as well as for reducing CPU usage.
- Always use minimum number of plugins on blog.
So, that was my recent case study about High CPU Resource Usage by WordPress blogs. If you have any questions or like to add something then feel free to comment below:
- WordPress Malware Detection & Security Tips
- Google Panda Effect on WordPress Blogs [Case Study]
- Copy-protect Your Content on WordPress Blogs