Common Issues with Joomla

joomla-icon

Joomla is a Content Management System (CMS) that will help you create your website. However there are many issues that you may encounter along the way to creating your website. In order to find out what might be going on, the first thing you may need to do is to turn on Show Errors. More about this can be found on our support page:

http://www.ixwebhosting.com/support/st_kb/understanding-options-within-php-ini/

So in order to begin looking at the errors that could be being displayed you will want to open up your php.ini file and enable display errors.

You should find a line that looks as follows:

display_errors = 0

You will want to change this to:

display_errors = 1

Another common issue is if Joomla says that it is unable to connect to the database. In this case it is almost always the case that the connection string it has been given is invalid. A connection string is simply a list of information that tells Joomla where and how to connect the the database. By default the connection string can be found in configuration.php. In this file you will find:

public $host = 'mysql1124.ixwebhosting.com';
public $user = 'A886676_MyDatabaseUser';
public $password = 'MyDatabasePa$$word!';
public $db = 'A886676_DB1';

In these few definitions you need to make sure that all of this information is correct. You can find all of this information about your database within your control panel.

Now that you’ve enabled errors and are able to connect to your database, you will most likely be able to see any error that Joomla may be displaying. However if you’re still having issues you may need to consider turning on debugging mode. Within your configuration.php file you will find line that looks like the following:

public $debug = '0';

You will want to change this to read:

public $debug = '1';

After saving this, if you go to your website, at the bottom of the page you will see the following:

Joomla_Debug

This Debug Console will show you session variables, database queries, and everything you could need to debug the issue you might be experiencing.

How to reduce CPU usage & improve website performance

If your website is running on Joomla & overloading one of our servers, then you might have installed a lot of additional components, plugins, templates, etc, or simply have a lot of articles that affect your website performance.

A non optimized application causes a higher server load and slows down your site. Even search engines prefer websites that load faster and rate them higher page rankings. The recommendations below will help you improve the situation.

  • Keep everything updated. Update Joomla and all its modules, plugins and components to the latest versions. This is critical for security and performance of your website.

  • Enable caching. Each time someone opens your website, Joomla has to fetch the content from its database, load all installed plugins, components and modules, load your template and combine all this data into a single page. When this option is enabled, the first time someone loads your page, the result from the above mentioned actions is stored. Then, all the following visitors will directly get the stored version of that page as if it was a simple, plain HTML file, which is much, lighter and loads faster.

To enable caching please login as the administrator to your Joomla admin panel → go to System → Global Configuration → System → select Conservative caching from the drop down list → save your changes.

In addition you should enable system cache plugin which will help you improve website performance. To enable the plugin go to Extensions → Plugin Manager → Search for “cache” & enable “System – Page Cache” plugin.

  • Disable Gzip compression. The option allows you to reduce web page size by compressing pages before they are transferred to visitors. However, if you have Gzip compression enabled, an extra overhead is added to each page request. Having Gzip compression enabled resulting in a higher load with no real gain in performance.

To disable the option, please go to System → Global configuration → Server → Server Settings”, find & disable the option “Gzip Page Compression” → Save your changes.

  • Remove unused extensions. Having unused plugins and extensions installed to our Joomla is utilizing server resources. Make sure that old and unused modules, plugins and components are not just disabled, but removed completely. All installed extensions can slow down your website, even if you don’t have them enabled.

  • Avoid Statistics Components. These use a lot of queries to constantly update and display your website statistics. This results in increased CPU usage and causes an added I/O wait. Use AWstats or Google Analytic instead.

  • Point your domain to CloudFlare. It will help you make the website load faster and protect it against online spammers and hackers. Among other features and monitoring tools, CloudFlare provides you with an ability to automatically lower the size of CSS, JS, and HTML. By reducing the number of CSS, JS, and the size of those files, you can improve the website loading speed. The service gives you an ability to set up your own firewall rules for blacklisting abusive IPs, bad bots or white listing trusted IPs. Don’t forget to install a CloudFlare plugin for Joomla. It is a very important step to reduce CPU usage for your website and protect it from brute force, DDoS attacks, etc.

  • Database optimization. Joomla tables require to be cleaned and optimized from time to time. Before you start optimizing database tables for your website, please make sure you created a backup of your database.

To optimize your database launch phpMyAdmin → click on the database name at the left part of the window → select all the tables → use the “Repair” and “Optimize” buttons.

  • Optimize image sizes. Images can be the main thing which slows down your website. Here are a few tips for you to optimize images you use on Joomla pages:

  1. Use image when you really need it.

  2. Avoid adding too many images to a single page.

  3. Never upload a high-resolution image and re-size on the server. Use local tools such as Adobe Photoshop or any other software to re-size images locally & then upload them to the server.

  • Reduce the number of scripts loaded. All you need to do on this step is install the ScriptMerge plugin and activate it. With its help, you will have all the CSS style sheets and JavaScript files on your Joomla page merged into the one single file.

  • Reduce what your users actually need to download. When any site loads, there are a number of things that need to be loaded for the site to actually display. The fewer files, the faster your site will load. The mentioned optimization alone can cut the time your site needs to load by almost a half. The first thing you need to do is figure out everything being loaded on your site. This will tell you what can be fixed. You can use services like “Website Optimization”, enter the URL for the page you want to check and it will show everything being loaded. The most important for us are the Total CSS images, Total Scripts, and Total CSS Imports.

  • Reduce requests from bots. You can instruct search engines on how they should crawl your website, by using a robots.txt file. When a search engine crawls a website, it requests the robots.txt file first and then it follows the rules the file contains. Example of robots.txt for Joomla installed in the root of your domain:

User-agent: *

Crawl-delay: 14400

Disallow: /administrator/

Disallow: /bin/

Disallow: /cache/

Disallow: /cli/

Disallow: /components/

Disallow: /includes/

Disallow: /installation/

Disallow: /language/

Disallow: /layouts/

Disallow: /libraries/

Disallow: /logs/

Disallow: /modules/

Disallow: /plugins/

Disallow: /tmp/

For more information on how  to decrease the server load caused by Google search crawlers please check this page.  

If you are  pointing your domain to CloudFlare, it will help you reduce the number of bad bots and crawlers hitting your website automatically.

Here is a robots.txt generator you can use to generate a custom robots.txt file for your website.

  • Add optimization rules to .htaccess (Linux only). The server handles the .htaccess file first when visitors open your website. In order to improve Joomla performance we recommend you to add a few rules at the end of the .htaccess file that is located in the folder where Joomla is installed.

# Enable expiration control

ExpiresActive On

# Default expiration: 1 hour after request

ExpiresDefault “now plus 1 hour”

# CSS and JS expiration: 1 week after request

ExpiresByType text/css “now plus 1 week”

ExpiresByType application/javascript “now plus 1 week”

ExpiresByType application/x-javascript “now plus 1 week”

# Image files expiration: 1 month after request

ExpiresByType image/bmp “now plus 1 month”

ExpiresByType image/gif “now plus 1 month”

ExpiresByType image/jpeg “now plus 1 month”

ExpiresByType image/jp2 “now plus 1 month”

ExpiresByType image/pipeg “now plus 1 month”

ExpiresByType image/png “now plus 1 month”

ExpiresByType image/svg+xml “now plus 1 month”

ExpiresByType image/tiff “now plus 1 month”

ExpiresByType image/vnd.microsoft.icon “now plus 1 month”

ExpiresByType image/x-icon “now plus 1 month”

ExpiresByType image/ico “now plus 1 month”

ExpiresByType image/icon “now plus 1 month”

ExpiresByType text/ico “now plus 1 month”

ExpiresByType application/ico “now plus 1 month”

ExpiresByType image/vnd.wap.wbmp “now plus 1 month”

ExpiresByType application/vnd.wap.wbxml “now plus 1 month”

ExpiresByType application/smil “now plus 1 month”

# Audio files expiration: 1 month after request

ExpiresByType audio/basic “now plus 1 month”

ExpiresByType audio/mid “now plus 1 month”

ExpiresByType audio/midi “now plus 1 month”

ExpiresByType audio/mpeg “now plus 1 month”

ExpiresByType audio/x-aiff “now plus 1 month”

ExpiresByType audio/x-mpegurl “now plus 1 month”

ExpiresByType audio/x-pn-realaudio “now plus 1 month”

ExpiresByType audio/x-wav “now plus 1 month”

# Movie files expiration: 1 month after request

ExpiresByType application/x-shockwave-flash “now plus 1 month”

ExpiresByType x-world/x-vrml “now plus 1 month”

ExpiresByType video/x-msvideo “now plus 1 month”

ExpiresByType video/mpeg “now plus 1 month”

ExpiresByType video/mp4 “now plus 1 month”

ExpiresByType video/quicktime “now plus 1 month”

ExpiresByType video/x-la-asf “now plus 1 month”

ExpiresByType video/x-ms-asf “now plus 1 month”

  • Use Optimization Extensions. There are a lot of extensions you can install for your Joomla website in order to improve its performance. Here are a few ones for you.
  1. JCH Optimize – this plugin combines JavaScript & CSS files, images, into sprites, minimizes and compresses JavaScript, etc.

  2. Cache Cleaner – easily clean the cache from the Joomla admin panel.

 

Was this article helpful?

Yes (4)
No (0)

We're sorry you didn't find this article very helpful. Please help us improve it by leaving your feedback below.

Error