Optimize and speed up your OpenCart application
In order to optimize and speed up your OpenCart application, please follow the steps below:Disable product counters
OpenCart counts the number of products in each subcategory. If your store has a lot of subcategories, however, this feature can negatively affect performance. To disable product counters, follow these steps:- Log in to OpenCart as the administrator.
- Click the OpenCart > Settings icon, and then click Settings.
- Select your store, and then click the Edit icon.
-
Click the Option tab.
- Under Products, for the Category Product Count option, click No.
- Click the Save icon.
Enable Browser Cache.
- Click on the File Manager under FILES in your Cpanel.
- Navigate to the OpenCart ‘root’ directory.
- Make sure to click on the Settings button and enable Show Hidden Files (dotfiles).
- Edit the .htaccess.txt file and add (copy/paste) the following at the end.
ExpiresByType image/jpg “access plus 1 week”
ExpiresByType image/jpeg “access plus 1 week”
ExpiresByType image/gif “access plus 1 week”
ExpiresByType image/png “access plus 1 week”
ExpiresByType text/css “access plus 1 week”
ExpiresByType application/pdf “access plus 1 week”
ExpiresByType text/x-javascript “access plus 1 week”
ExpiresByType application/x-shockwave-flash “access plus 1 week”
ExpiresByType image/x-icon “access plus 1 week”
ExpiresDefault “access plus 1 week”
EXPIRES CACHING ##`
Enable Gzip Compression.
- Do the exact same as in Enable Browser Cache section, by copy/pasting the content below at the end of the .htaccess.txt file:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
remove browser bugs
BrowserMatch ^Mozilla/4 gzip-only-text/htmlBrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent`
- Click Save Changes.


