WordPress resource consumption

WordPress executions

Before starting with details, I think it would be good to explain “why hosting service providers count the executions?” and “why lowering them ensures smooth performance?”. Based on my experience on the field, I can say for sure that hosting companies pay attention to executions and overall performance, because increased usage of server resources may affect the other users hosted on the same server. The main idea is to guarantee the fair share of the resources.

What is the connection between WordPress executions and CPU usage ?

Well, that is easy. Usually a high number of executions requires more CPU. The things however, going further. If your account generates a lot of executions with low real time CPU, then this means that your website is well known with a lot of visitors or you are under some kind of attack. Another thing is low number of executions with high real time CPU. The only conclusion in this case is poor coding. Perhaps some of the additionally installed plugins does not work as good as expected.

So, how to proceed when the alarm is sounded ?

Usually the hosting service providers offer a number of specific tools to analyse the stats and logs to find a solution. In this particular case, we will review the options in Awstats tool which is available in all cPanel based control panels.

Hosts – in this part you can find top hosts or IP that visited your website. If you see suspicious activity, you can easily block the offending hosts using IP Deny Manager. This is another handy tool available in cPanel.

Robots and Spiders – nowadays the automated programs that crowl websites are known as spiders or robots. In many cases however, they are quite aggressive and cause CPU spikes. What you can do is block or limit them using robots.txt file. It should be placed in the root folder or your website. It should contain instructions about the robots and more specifically what to be crowled and what not. Additionally you can set crowl delay to lower the number of hits.

Pages and URLs – this is another important part of the stats. If you see unusually high number of hits towards the login page, then perhaps some bots are trying to gain access. In this case, I advise you to protect the login form either using plugin or deny rules in .htaccess file

WordPress and Slow Mysql Queries

Another aspect of the whole problem is the interaction between WordPress and Mysql daemon. Considering the fact that by default WordPress operates with indexed databases, during its normal functionality no slow queries should occur. The situation however, changes when there are poorly coded plugins or the database got too large. When it happens, Mysql daemon needs more time to handle the query and return results. If the time frame is over a second, then this is slow and the query itself is considered as slow. Mysql puts it in slow query log and starts working slowly because other queries are made while the daemon is trying to work on the slow one. The ultimate effect of this is slowly working website or server.

What to do when the reason for the low speed are slow Mysql queries ?

More or less this problem requires the attention of a professional developer familiar with the specifics of your website. Random actions such as clearing logs or tables may affect the normal functionality of the entire website, so I advise you not to proceed this way. If you have slow queries, then they need to be analysed and carefully fixed. Note that Mysql restart is only temporary solution, so you should not reply on it. If no developer is available at the moment, you can open PhpMyAdmin tool and find the largest tables. Once done, you may disable the plugin that puts or gets data from it. Another option is to look for transient records and remove them using plugin. Large number of transient records in wp-options table could be a good reason for slow performance.

Do you want to share your opinion?

Your email address will not be published. Required fields are marked *


We are not industry specific. We are WordPress specific. We work with everyone to help them find solutions with their troubles.
If you show us the problem you are experiencing, we will show you how to fix it. It is that simple.

Here you can check the latest resolved WordPress issues

Reported WordPress issues

  1. wordpress shipping cost reduction total cart price
  2. wc_get_product_ids_on_sale() …getting product on sale in WooCommerce
  3. Preserving custom pages via redirect
  4. Wordpress - get_template_part() section not showing
  5. Can't click behind my Iframe. Is it possible?
  6. To show toggle and simple menu
  7. Post in WordPress
  8. Get Json Data when a variable matches with ACF custom field in WooCommerce
  9. BuddyPress shared user-base on Multisite separate sites
  10. How to show product variation in cloumn instead of row in Wordpress?

WordPress problems we are working on

  1. All pages redirect to home page
  2. Is possible to read a value from a dynamic HTML table and pass it to an input form?
  3. Google Shopping With Multiple Titles
  4. Wordpress - white screen of death when trying to update a page and/or a file in Editor
  5. cart is not working with more than 3 variations Woocommeerce.?
  6. Apache set Access-Control-Allow-Origin from http to https
  7. Wordpress works fine on admin dashboard but not loading for public
  8. Tranform in ::before breaking child elements in Wordpress navigation menu - CHROME
  9. How to flash error message in wordpress?
  10. Warning: Illegal string offset while searching of product

Resolved issues

  1. How to edit this function to improve performance in Wordpress?
  2. Wordpress get post id
  3. Open Lightbox on onload page
  4. Blogs posts on an alternative page?
  5. Style don't change in form
  6. Using Consolibyte's PHP Devkit to Add a Customer to Quickbooks POS Desktop v.12 w/ Web Connector
  7. How to reset all fields when adding to WooCommerce Cart
  8. Wordpress Rest API and AngularJS ui-sref and custom HTML
  9. Importing contact form in front-page.php
  10. Wordpress - adding a custom font via font-face
wppotion - powered by persistence and passion