A substantial chunk of our work consists of optimizing Joomla websites. As such, we have gathered over the years a vast experience in that particular field and we almost know every variation of the problem as well as its causes. In this post, we would like to share our knowledge with our readers by providing them with the 20 questions that we usually ask ourselves (well, they’re really 19 questions + a final question that only you – and not us – can ask) when we’re handed over a Joomla optimization task.
- Is your Joomla website really slow?
Yes, that might be a weird question, but let us tell you a little story after which you will probably feel that this first question isn’t that weird after all! Yesterday, we had a client whose Joomla website was loading in 14 seconds (yes, fourteen seconds). After thorough investigation and a lot of optimization, we discovered that the main problem lied with a 3rd party JavaScript widget that is used to load ads (and no, it’s not DoubleClick). Obviously, this is not a Joomla problem… So, before (mis)judging your Joomla website, check whether you have some JavaScript code (ads, social widgets, etc…) that is causing the delay in the loading of the website.
Google PageSpeed Insights is a great tool that tells you whether the problem is from your Joomla website or not. If your server response time is higher than 1 second, then the problem is definitely from your website, otherwise, it might be something else.
-
Is your Joomla website slow only at the time when you’re posting articles to the website?
If you notice a significant lag on your Joomla website when you’re posting new articles, then this is usually primarily related to one of the following: Smart Search and/or the assets table. Let’s start with Smart Search: every time you create/update an article on the website then the Smart Search plugin, if enabled, will insert all possible search queries in the Joomla database (in *finder* tables), an action that causes a huge load on large Joomla websites. The irony is, the absolute majority of Joomla websites don’t even use the Smart Search functionality but still, they have all the Smart Search plugins enabled. Obviously, addressing this problem consists of disabling all the plugins starting with Smart Search in Joomla’s backend, and, if you’re one of the rare Joomla administrators who actually use Smart Search, then we suggest you try Sphinx to power your Joomla’ search engine, which is much, much faster and way, way lighter on your server.
Moving to the assets table, which was discussed before, then all you need to do is to regularly clean it (clean it, and not clear it!), and you shouldn’t have any problems because of it anymore.
Of course, there are other issues that might be causing slowdowns on the website when new articles are posted, but the root of these issues is typically a plugin that runs when articles are saved (so check your 3rd party plugins one by one until you find the culprit).
-
Is your Joomla website slow during off hours?
A couple of months ago, a client called us and told us that every day, at around 2 AM, his website slowed down to a crawl for about 30 minutes. A quick investigation of the issue revealed that the website (which was a huge website) was being backed up at the time, and, during the database backup, MySQL was experiencing a very high load causing the website to be super slow (often crashing the website for a few minutes). Fixing the problem consisted of dropping all the test databases/test tables, clearing large tables which data is not needed, disabling database powered stats (such as disabling Exim’s stats), and excluding some directories from being backed up (of course, this has nothing to do with MySQL, but it lessens the load on the file system).
-
Are you using InnoDB or MyISAM?
There are many existential debates in this world, such as the chicken and the egg debate (which came first), the white bread vs. whole wheat debate, the computer vs. the tablet debate, and, of course, the MyISAM vs. the InnoDB debate. We’re among those who believe that MyISAM is significantly faster than InnoDB (MyISAM and InnoDB are both storage engines in MySQL), and we are basing our information on the many Joomla websites we have optimized. So, if you are using InnoDB, then try switching to MyISAM and see if that helps improve the speed on your website. (By the way, if you really want to know, we think that the chicken came before the egg, we think that the white bread is better and tastier than whole wheat bread, and we definitely prefer computer over tablets).
-
Are you positively, absolutely sure your website is not hacked?
Some Joomla websites that we were commissioned to optimize turned out to be hacked. These websites were grabbing remote content (using curl) from malicious websites, and this was causing the slowdown as these malicious websites were very slow to respond and the website had to grab the malicious content before loading. We examined a case here. Scan your website, or, better yet, hire some experts (such as, ahem, us) to check whether your website is hacked or not.
-
Have you checked your firewall log?
In one rare instance, the slowness of a Joomla website that we examined was caused by the firewall. In short, the firewall was over-protecting the website from flooding (with SYN_FLOOD), and was incorrectly interpreting multiple connections made from the same page (to load images, CSS, and JS files) as a DoS attack. Fixing this problem consisted of a quick call to the host which resolved the problem by tweaking the firewall settings.
-
Have you checked that your Apache configuration can handle the number of connected clients that you’re getting?
In Apache’s configuration, there is a setting that will cap the maximum number of clients (workers), and each client is needed to serve on visitor. If you get a number of simultaneous visitors higher than your specified number of clients, then Apache will queue those visitors, resulting in a dramatic overall drop in the performance of the website. To check whether you have this problem or not, you will need to check the Server Status -> Apache Status page in WHM, if you see something like 0 idle workers, then this means that you will need to increase your maximum number of clients. This can be done from WHM as described here.
-
Are you using any kind of caching on your website?
If your website is gradually slowing, then you should consider using caching on the website. You should start with enabling Conservative Caching in the global configuration settings of your Joomla website, and then, if that doesn’t help things tremendously, you should enable the System – Cache plugin in your Plugin Manager (note that you should only do this as a last resort, or if you can’t afford to hire some experts to optimize your Joomla website, since the System – Cache plugin typically causes many conflicts and erratic behaviors). Also, make sure you enable template-specific caching if available (heavy templates usually have their own caching mechanism that has to be enabled separately).
-
Do you have the necessary horsepower on your server?
A few weeks ago, we have worked on a super large Joomla website which resided on a very old box with only 8 Gigabytes of RAM and a not so powerful quad core processor. That website, in our opinion, should reside on a very powerful server with at least 32 GB of RAM and a 48 core processor. We did manage to optimize it, but it was a costly operation for the client (who was informed in advance that the website was running on an inadequate server). Sadly, there is no secret formula that can tell you what kind of processing power (and RAM) is needed based on your number of pages and your number of hits because there are so many variables and unknowns that must be accounted for in such a formula (which, again, doesn’t exist). So, the only way to know that you need a bigger server is that if you notice that your RAM and your swap is entirely allocated almost all of the time and/or your CPU load is constantly high. By the way, an SSD drive is always a good idea as it speeds up filesystem access very noticeably (especially when it comes to write activities).
-
Have you checked your MySQL slow query log?
The MySQL slow query log is an indispensable tool to locate bottleneck queries. We use it in every Joomla optimization job that we get because it tells us the exact queries that are taking a long time to execute which helps us optimize these queries (or optimize the underlying tables/fields). When we work with the slow query log, we first address the queries that are taking a long time to execute, and then we attack the queries that appear in the log frequently.
-
Have you checked that the long_query_time is set to 1 second in your my.cnf MySQL configuration file?
If you examined the MySQL slow query log and saw nothing, despite the fact that slow query logging is enabled in the my.cnf file, then you should check whether the long_query_time setting, which defaults to 10 seconds, is set to 1 second in the my.cnf file. This will give you access to all the slow queries, not just those that take 10 seconds or more (it might be that you have a barrage of 1-second queries that are slowing down your website).
-
Are you getting a sudden, unexplainable spike in your website’s traffic? It might be that your website is under a DoS (Denial of Service) attack which typically causes severe load issues on the server, and subsequently the website. You should check your logs, and, if you found anything suspicious, then you should consult with your host in order to block these attacks. There are also some extensions in Joomla that block DDoS attacks, but we don’t think highly of them since they are typically heavy and they often cause mysterious problems.
-
Are you using all the extensions that you have installed on your website?
The number of extensions that you have on your Joomla website is inversely proportional to its speed (and to its security). Surely, you are probably thinking, “but these extensions are doing nothing on the website and they have no data whatsoever”. That, of course, might be true, but many extensions come with plugins that may be running on each page load, affecting your page load speed. If you’re not using these extensions, then the best thing that you can do is to uninstall them!
-
Have you done anything unusual on your website recently?
Have you installed/uninstalled an extension? Have you updated an extension? Have you modified the ACLs? Have you asked a developer to work on your website? Have you modified the core in any way? Have you added something to your .htaccess file? Have you switched to another server/host or has your host upgraded applications on your server? (OK, that’s not really done on your website, but it’s definitely worth mentioning). If you have done any of the above, then your problem might just be there. Try, if possible, to revert to a backup to see if that resolves the problem.
-
Is the problem happening on all the website?
If the problem is just happening on one or a few pages on your website, then the slowdown might be caused by a module. Check the modules assigned to those pages and unassign them one by one until the problem is resolved (you will then be able to find the culprit module).
If, after doing that, you still have slow load speeds on those particular pages, then the issue might be caused by a condition hardcoded in your template or it might be that these pages are using a different, slower template.
-
Have you tried switching to a core Joomla template?
Some templates, especially responsive templates, are heavy, very very heavy! If you’re using a template that you think is a bit heavy then try switching to a core Joomla template (such as a beez template) and see if that solves the problem. If you see a noticeable improvement after doing that, then don’t rejoice immediately, as it might not be the template, but it might be one or more modules with positions assigned in your original template but non-existent in the core Joomla template (please answer the previous question before answering this one).
-
Have you checked your Google Webmaster Tools?
Your Google Webmaster Tools can reveal some important information about your website when it comes to performance, particularly on when the performance problems started. This will probably give you a better idea on where to look to address the problem.
-
Have you switched to a MEMORY based session table?
The #__session table is probably the busiest table in any Joomla website, and, since the data in that table is not critical, then you can safely use the super fast MEMORY storage engine for this table. A discussion on how to do this is available here. That little change that you will make on the #__session table will yield exceptional results, trust us on this one (well, you can always try it without trusting us!)!
-
Have you just upgraded/migrated your Joomla website?
We don’t like to say it, but this is a fact: Joomla 1. 5 is faster than Joomla 2.5, and Joomla 2.5 is faster than Joomla 3.x, and, for some reason, we have a hunch that Joomla 3.x will be faster than Joomla 4.x. So, if you just upgraded/migrated your Joomla website then expect a degradation in the overall site’s performance until you perform some much needed optimization (that is the case especially when you’re running a high traffic and large Joomla website).
And, last but certainly not least…
- Have you contacted itoctopus?
If you haven’t contacted us yet, then don’t be a stranger! We will definitely discover what the issue is and we will get your website running smoothly affordably, quickly, and cleanly! We’re always here for you – and for your Joomla website.