How to Fix Siteground’s CPU Limits / inodes limit

SiteGround CPU limits should not be a major concern for you. Every hosting company sets limits to the amount of resources you can have per plan. 

In this article we will discuss the many steps you can take to reduce your CPU limits/ inodes count. Most of the steps to take to reduce CPU limits will also not cost you anything to implement.

WordPress comes with some pretty neat tools to manage and edit images. You can easily upload images, align them, and even edit them inside WordPress.

The corresponding images shows you the different resources than you can reach per plan per month. Keep in mind, the diagram does not cover the SiteGround Cloud hosting solution where you can scale your resources on demand and those obviously will have a Higher CPU limit .

The corresponding images shows you the different resources than you can reach per plan per month. Keep in mind, the diagram does not cover the SiteGround Cloud hosting solution where you can scale your resources on demand and those obviously will have a Higher CPU limit .

1. Upgrading your Hosting Plan

Upgrading your hosting plan, should not be the first step you take. Sooner or later as your site grows and becomes popular, you will need to optimize it for the best results. You should start with the below steps and then finally, only as a last resort, should you upgrade your hosting plan, to address your CPU limits/inodes using SiteGround for hosting.

2. Reduce the time frequency of Cronjobs or disable them

The Cron command-line utility, also known as Cron job, is a job scheduler that runs periodically at fixed times, dates, or intervals. You can think of a cron job as a task that is scheduled to run at defined period in time.

 In SiteGround, Cron jobs are set to run of on every site visit. You should change that setting for it to run every 10 minutes.

As a matter of fact you can set the interval for any specific Cron job to any amount of time of your choosing. You just need to understand the purpose of the Cron job and be comfortable with the time interval for it to run.

In Siteground under Websites option, select Site Tools and then to the left Under “DEVS” you will see an area for CronJobs. From there, select each Cronjob in the list and set it to a new time interval.

3. Upgrade to the Latest version of PHP.

With each new PHP version, not only increases the performance of how fast your site loads, but it also decreases the resources needed to run your site.

You should always use the latest version of PHP. As a matter of fact, Siteground even allows you to change the version of PHP to a higher version then what is currently supported. Keep in mind, going up in PHP versions, might cause some issues with themes and plugins where the respective developers, have not yet made their themes and plugins compatible with the future versions.

In Siteground, under Websites option, select Site Tools and then to the left Under “DEVS” you will see an area for PHP Manager, Under your PHP Manager area, you will learn what version of PHP you are running , in addition you can change the version and upgrade to Ultra-fast PHP. As of writing this article, the latest version of PHP is 8.1

4. Optimize WordPress Heartbeat

The WordPress Heartbeat API checks your post edit pages every 15 seconds and your dashboard and front end every 60 seconds, even in the absence of scheduled tasks. This can generate high CPU usage if you leave browser tabs in which you’re logged to WordPress opened for a longer period of time. You can modify these settings to reduce load.

How to Limit WordPress Heartbeat

To limit the functionality of the WordPress Heartbeat plugin, you can adjust the execution frequency for individual locations. This can be done using the SiteGround Optimizer Environment tab for each of the three locations. By saving the changes, you override the default Heartbeat execution frequency with the value specified in the Frequency slider option. Alternatively, you can utilize the menu to select the option Disable for the selected location, which will disable the Heartbeat feature for that place.

With the new settings in the SiteGround Optimizer plugin, you can either totally disable the Heartbeat API if no functionality requires it, or configure it to run at significantly larger intervals. By default, Siteground disables it on your admin and front end pages, leaving it to run every 180 seconds on post edit pages.

5. Make use of caching

One of the nice things about SiteGround is that it offers caching as part of your hosting plan.You do not need additional plugins to turn it on.

Caching is a mechanism to improve the performance of any type of application. Technically, caching is the process of storing and accessing data from a cache. A cache is a software or hardware component aimed at storing data so that future requests for the same data can be served faster.

Caching takes off a significant amount of load of your server which in tern saves you CPU utilization.

In addition SiteGround offers its users, 3 types of caching which are static, dynamic & memcached. You should take advantage of all of them. Using the SG Optimizer settings, they are to easy to configure. All you have to do is turn on the switch.

6. Remove staging sites and old backups no longer needed

If left unchecked, backups that are produced automatically by plugins or other third-party services frequently use up all of the available disk space. To conserve disk space and reduce the number of CPU usage/ inodes, download unnecessary backups and remove them from your hosting account.

You may examine your current staging copies under: Site Tools > WordPress > Staging Area and remove any that you no longer need

7. Get Rid of Inactive Plugins

If you use WordPress and have plugins on your site that are not active, you need to remove them. The code base on your account continues to use up your CPU cycles/inodes allowance even after you deactivate the plugins.

It is important to make a distinction here between the impact of inactive plugins on performance and inodes. Inactive plugins have no impact on performance, but they DO have an impact on the consumption of CPU cycles/inodes.

8. Eliminating Unused Image Sizes

In WordPress, your theme may generate duplicate, unneeded copies of each submitted image. Check your theme’s options and leave only the images you’re currently using.

You can use a plugin such as: Regenerate Thumbnails. First you will need to delete the copies of the images you are not using, then regenerate thumbnails by removing unneeded sizes, using the plugin.

9. Keeping an eye out for the total numbers of cache files being used

Today, web applications such as WordPress, typically use file caching by default, resulting in the creation of a large number of cache files within your hosting account. When this happens, you will experience an increase in your CPU cycle usage/inodes count.

For WordPress, you will need to FTP or SFTP into your server and look in the wp-content folder for folders with similar names as “cache” and clear them.

While using Siteground hosting, it is best to use their native caching plugin, which, in my experience, outperforms the leading third-party caching plugins on the market.

Their caching plugin already comes installed on your WordPress site and is called “SiteGround Optimizer.” You should leverage the plugin’s dynamic caching option. It does not rely on file-based caching and will not increase your consumption of CPU cycles/ inodes.

10. Delete the .opcache folder

You will only be able to access and delete the.opcache system folder using SSH. Once deleted, it gets rebuilt, minus the cache from previous PHP versions and or code that is no longer being used.

11. Leverage the Cloudfare CDN

Cloudflare’s Content Delivery Network (CDN) is a geographically distributed group of servers that ensure fast delivery of Internet content, including HTML pages, JavaScript files, style-sheets, and images. Caching static resources at Cloudflare helps offload resources to them, which can save lots of bandwidth and put less stress on your server load and bandwith.

Cloudflare does not require an extra CDN subdomain or hostname, and you do not need to change your URLs.

Cloudflare makes customer websites faster by storing a copy of the website’s content on the servers of our globally distributed data centers.

Siteground use to have a partnership with Cloudflare, but no longer does. However, you can still leverage Cloudflare and even use their free plan. For $20 a month, you can use the Cloudflare pro plan, which comes with a lot more optimization options and even a WAF (Web Application Firewall). But if you are on a tight budget the free plan by itself is great and will significantly reduce your CPU usage/inodes count

12. Blocking Bat Bots

What is a bot? A bot is a software application that automatically performs certain tasks quickly and at scale. It is a tool that can be used for good or bad purposes. Bad actors use bad bots to spam, scrape, scan your site, sending thousands of requests per minute which in turn exhaust your CPU resources.

One way to block bad bots is by the use of the “Blackhole for Bad Bots” plugin. It is very easy to use and has many rich features. It blocks the bad bots automatically for you.

A second method that you can leverage to get rid of the bad bots is to use the Cloudflare business plan for $20 a month, which has strong capabilities in blocking them.

Lastly, you can block them examine your site for strange or harmful bots that visit it on a regular basis.

Create a list to keep track of host names or IP addresses that will appear in your security log. Conduct a Google search for each of the host names to determine whether they have been flagged as problematic bots by other website developers.

Bear in mind that you’ll need to conduct some study to determine whether or not a bot is a spam bot.

13. Disable Xml RPC php

What exactly is XML-RPC?

XML-RPC for WordPress was created to facilitate remote communication between your site and third-party apps. This implies that users can connect with their WordPress site via a variety of alternative blogging platforms or mobile applications. This was advantageous in the early days of the internet, when users desired to modify content offline and then post it via their WordPress site.

Certain circumstances will require the use of XML-RPC. However, technological advancements have significantly limited the use and functionality of XML-RPC since its introduction. As a result, the initial benefits of this feature have been exceeded by the potential security dangers associated with leaving it enabled.

What is the purpose of disabling XML-RPC?

There are security issues connected with enabling XML-RPC. These may include the following:

 Brute Force Attacks – In this type of attack, an attacker uses XML-RPCc to try thousands of username and password combinations until they get access to your site. This is because xml-rpc does not have the same limit on login attempts that WordPress does.

 DDoS Attack – A type of attack in which an attacker uses XML-RPC to ping back thousands of IP addresses. This enables them to deliver a deluge of data and traffic, resulting in network outages and even network shutdowns. All this activity can have severe detrimental effects by skyrocketing your CPU utilization.

Please see our article on disabling XML-RPC

14. Keep your email and web hosting separate

Keeping your email and web hosting separate has several advantages. Email consumes a lot of resources and CPU utilization. Having email hosted with a different provider will significantly reduce your CPU utilization, since your hosting and email will not be sharing the same resources.

In addition, if you host both email and your website on one server using the same hosting plan, you risk losing both email service as well as your website being down if there are any outages.

It is best to have dedicated resources just for email and dedicated resources just for your web hosting. You can use Google email or the Microsoft 365 with outlook by pointing your email records to a new provider such as for about 5 dollars a month.

Having dedicated resources for email as well as the webhosting is the smart way to go and it significantly reduces your CPU usages.

15. Optimize your images

The best and easiest way to optimize your images, is to use Adobe Photoshop, using Photoshop, you will need to save your images as: WebP format.

WebP is a modern image format developed by Google that is designed to provide a balance between image quality and file size. It uses both lossy and lossless compression techniques to reduce the size of image files, which significantly helps in speeding up website load times and reducing bandwidth usage.

Adobe now offers the Adobe Cloud, where for a reasonably monthly price, you can leverage all of the Adobe Suite of tools.

Keep in mind, there are several plugins that offer to optimize your images in WebP format, but honestly, you dont really need them.

In addition, you also have another way of converting your images to WebP format,  by leveraging the Siteground Optimizer plugin, which will automatically convert your images to this format.

My preference, is to use Adobe photoshop to convert the image to the Webp format, Adobe Photoshop gives you greater control for each image in deciding the exact compression percentage by using a sliding scale, when you Save As: the images.

16. Make use of Compression and Auto-Optimize your files.

The Siteground optimizer plugin, offers your the ability to compress your HTML, JavaScript, and CSS files with one-click setup before sending them over to the browser. Smaller files mean faster load time and less stress on your resources which result in less CPU usage. 

In addition make use of the asset Optimization, Compress feature in the Siteground optimizer plugin to inline, combine, defer, or move your files to improve page speed without any coding knowledge.

Asset optimization, you will reduce the server load which decreases the CPU usage cycles/ inodes count

17. Keep your database optimized

It is critical to keep your database optimized in order for it not to consume more CPU resources than necessary.

Siteground offers a database clean up feature that is basic. You can use it by going to the SG optimizer plugin.

Since I have also recommend Hummingbird, that plugin also has a database clean up functionality but both those products are limited in terms of their capabilities. Please don’t get me wrong, you can still achieve amazing CPU reduction by leveraging any of those tools.

However, when it comes to cleaning up your database, I have found the WP Reset plugin to be the most comprehensive when it comes to optimizing your database.

Control the use of High CPU limits

Lets face it. The beauty of WordPress is in the amount of available plugins it offers, which ads any functionality you can image to have the website of your dream. Unfortunately not all plugins are created equal. Some are much more resource hungry then others. In addition, other plugins even premium ones that add great functionality consume a considerable amount of CPU utilization. It is your job as a site owner, to go through all your plugins and see which ones you truly need and which ones you can consolidate. Sometimes the functionally provided by plugins can be implemented very easily by changing a couple of lines of Code.

A great tool to use to monitor the utilization of your resources as well as what plugins are consuming the most resources, is a free plugin called Query Monitor. It is very powerful and provides a wealth of knowledge in terms of diagnosing pretty much anything you need to have looked at in WordPress. 

Just make sure do deactivate it, when you are done with your troubleshooting.