Optimizing Magento 2 for Speed
It’s no secret that speed counts in today’s Internet. Google has made it quite clear that the faster web pages render, the better it is for a website’s rankings.
For a Magento 2 website, there are three areas to focus on to increase overall render times:
- Server hosting
- Indexing and caching
- Theme features
If a Magento store can master all three, they are in a prime position to capitalize on ranking performance.
Server Hosting for Magento 2
As the leading Magento hosting provider in the world, MageMojo has learned—and taught a lot—about how to optimize server performance for Magento 2. Their STRATUS MaaS platform represents the state-of-the-art when it comes to scalable, cloud hosting.
The ideal server hosting environment requires much more than simply piling on RAM and CPUs; to make Magento literally pop onto a visitor’s screen, the hosting must be a fine-tuned combination of server hardware, content delivery network (CDN), caching, and network throughput.
While dedicated servers can actually deliver a stellar performance, cloud-based hosting enables Magento stores to receive the greater network bandwidth and when needed, auto-scaling to meet sudden spikes in traffic. Furthermore, cloud hosting keeps overall costs in check as merchants only pay for the actual services used, whereas dedicated servers must be fully paid for, whether or not they are fully utilized.
MageMojo has created the only fully automatic scaling Magento-focused hosting platform. It took us several years and millions of dollars in research and development to arrive at such a level of performance.
Improve Speed with Indexing and Caching Tweaks
Magento used indexes heavily to optimize database performance. The re-indexing can truly bog down a Magento store if not configured correctly. Indexing mode should be set to “Update by Schedule” instead of “Update on Save.” The allows indexing to run during the regular cron schedule, whereas if indexing occurs whenever a related record is saved, the re-indexing can truly stack up and impede store efficiency.
Beginning with Magento 2.1, enabling flat catalogs is not recommended as a best practice.
As for the cache, all caches should be enabled. With Magento 2, Varnish FPC should be enabled rather than the built-in full page cache. Redis cache should be used for both caching and for sessions. We highly recommend that no store use their database for storing session information.
Purge Database Tables
Several Magento tables can get quite large over time, which can affect database performance. By periodically purging larger tables, you can reduce database indexing routines and speed lookups.
One table you should attend to is the quotes table. This table contains a record of every shopping cart created, whether or not it converted to a completed sale. By purging unconverted carts older than, say, 60 days, you can greatly downsize this table.
Log tables created by various extensions and add-ons should be likewise purged from time to time. One common table we often find that needs pruning is the mageplaza_smtp_log table.
Magento themes come in all shapes and sizes. At first glance, it’s difficult to figure out which ones are truly fast and which ones are not. If you’re shopping for a theme try running their demo site through Google Lighthouse to identify any potential problems. The most common are those that prevent early rendering of the page.
If you find that your theme is hindering your speed, do not be afraid to consider another theme. The loss in revenue from poor rankings can far outweigh the cost of a new theme.
These are a few of the most important considerations you should consider when optimizing Magento 2 for faster page rendering. For more information or assistance with optimizing your Magento 2 installation, please refer to our Knowledge Base articles.
Other Articles You Might Like
YOU ARE ELIGIBLE FOR A PAYROLL PROTECTION LOAN
If, you work in the Gig Economy, you are a 1099 worker, a 1 person business, independent contractor, work for hire, self-employed, along with any business with less than 500 employees. Under the CARES Act, qualifying SBA loans…
Load In The Loop: Episode 17 – I Must Garden
Load In the Loop: Episode 17 is here! Join Eric Hileman and Ivan Chepurnyi as they identify and fix some performance issues for I Must Garden, an online gardening store. What will they find? Can they fix…
Load In The Loop: Episode 10 – Hooks and Lattice
Load In the Loop: Episode 10 is here! Join Eric Hileman and Ivan Chepurnyi as they identify and fix some performance issues for Hooks and Lattice. Sponsored by blackfire: https://blackfire.io/ Follow us on Twitter! https://twitter.com/loadintheloop Ivan: email@example.com,…