8 Ways to Speed Up PrestaShop
Although online shopping is much more convenient than going to a brick-and-mortar store, people tend to be less patient when making purchases over the internet. Users expect instantaneous reactions when they click on links. The longer they have to wait, the more likely they are to get cold feet. Consequently, online stores that prioritize speed make more money.
If you use PrestaShop for your e-commerce website, you have many tools available to fine-tune your shop’s performance. This guide will cover some simple ways to speed up PrestaShop.
How to Speed Up PrestaShop: 8 Tips to Optimize Your Shop’s Performance
PrestaShop is an open source platform that allows anyone to create their own online shop. Written in PHP, PrestaShop is a popular solution for websites of all sizes thanks to its wide selection of add-ons. Check out each of the 8 tips below for advice on how you can speed up your own PrestaShop site.
1. The Three C’s: Combine, Compress and Cache
This option will condense all of your CSS, JS, and HTML into single lines of code, therefore, getting rid of any whitespace or unnecessary characters. Thus, your file sizes will be smaller, and your web pages will load faster. From the top menu bar, look under the Advanced Preferences tab and click on Performance. Then, look for the CCC option.
2. Choose a Cache Module
The importance of implementing a cache module cannot be underestimated. On top of reducing page load times by several seconds, in some cases, they can drastically reduce your server load since delivering cached files consumes minimal resources.
However. not all caching modules are created equally. There are free ones out there, but serious online stores should invest in a premium option like JPresta Page Cache, xtendify Express Cache or Page Cache Ultimate Module.
3. Double Up Your Web Servers
When it comes to choosing a web server, Nginx or Apache are your obvious options. Each has its benefits and drawbacks, so which one should you use? The answer is both! Using the two servers simultaneously makes up for their individual deficiencies. The most common approach to this is to put Nginx in front of Apache as a reverse proxy. That way, Nginx will handle all of the static content requests while Apache handles dynamic content requests. To learn more, check out our complete Nginx vs Apache guide.
4. Invest in a CDN
If you haven’t already, take advantage of a content delivery network (CDN) to speed up content delivery. Once you set it up, simply input the media service information into PrestaShop. A content delivery network will cache your static assets across its network of edge servers around the globe. Therefore, a visitor’s request can be routed to the CDN’s nearest edge server as opposed to traveling to the origin server each time.
Integrating PrestaShop with KeyCDN is very simple and can be done in just a few steps.
5. Use the Latest Version of PHP
Installing or upgrading to the latest version of PHP could bring some major speed improvements. PHP 7 was a substantial upgrade in terms of performance compared to PHP 5.
A few pros of PHP 7 include:
- The request handling limit for PHP 7 is double that of PHP 5.6, and it responds to each request quicker
- By altering how it internally handles data, PHP 7 is 3.5 times more memory efficient than PHP 5.6
Read our complete PHP vs HHVM article to learn more.
6. Optimize Your Database
For your database, you might want to try Percona Server or MariaDB rather than the standard MySQL for improved scalability. Alternatively, you may want to use a separate server for your MySQL if your website has lots of traffic. The size of your sever ultimately matters less than how it’s set up.
Also, don’t forget to optimize your database every now and then. The free PrestaShop Database Optimization module does a sufficient job. Just make sure you don’t accidentally wipe out order information or catalog data!
7. Take Advantage of PrestaShop Add-ons
Speaking of modules, the PrestaShop store has a whole section of add-ons for improving your online store's performance. Such tools allow you to implement lazy loading, image compression and other strategies to optimize your user experience.
8. Uninstall Any Unused Modules
PrestaShop 1.7 comes preloaded with hundreds of features and modules, many of which you don’t need. Disable and uninstall any modules your store doesn’t use so that they don’t get loaded.
Speed Testing Tools
Of course, you can’t know if your optimization efforts are paying off unless you quantify your gains. Thankfully, speed testing tools can evaluate your website’s performance and point out areas for improvement. Whichever tools you choose, run tests regularly to make sure you’re operating at optimal speed.
What Not to Do
- Don’t bother with PHP accelerators such as Xcache or APC. Instead, try OPcache for faster PHP delivery.
- Don’t bother with the PrestaShop stats modules since they take up space in your database. Instead, use an alternative like Google Analytics.
- Don’t rely too heavily on fonts or files from external sources. Also, limit your use of external tracking scripts.
- Don’t try to scale large photos with HTML. Optimize images in a program like Adobe Photoshop or with an image compression module.
Evaluating Your Progress
More important than any metric is your bottom line. Are your optimization efforts driving more sales? While website speed is probably the most pivotal factor to an online store’s success, it’s still just one of many. Your site layout, your prices, and your products are all important. Nonetheless, if customers have to wait for long load times, they’re not likely to stick around to see all that your store has to offer.