When migrating, replatforming, or otherwise making the journey from Magento 1 to Magento 2, hosting is often one of the last considerations that you’ll look at. However, different versions of M1 and M2 have different hosting needs and requirements, and without a properly configured hosting environment, your new Magento 2 website launch will ultimately fail in one way or another. That’s why, as with most things Magento, an ounce of prevention is worth a pound of cure.
Technical requirements notwithstanding, your new website build is a great chance to leave behind an aging hosting environment, which may contain obsolete files and software along with security holes. An older environment may also be on dated, underperforming hardware. A new site is a chance to leave behind old headaches, and start fresh. In relative terms, if you’re moving to a new phone carrier, do you really want to port over your 5-year-old iPhone? Or would it make sense to start fresh if you’re going to pay a monthly fee for it anyway?
Curious about the differences in hosting environments when moving from Magento 1 to 2? Here are some prime examples:
– Different versions of Magento 2 require different versions of PHP & MySQL, for instance:
For example, Magento 2.1.x is compatible with PHP 7.02, 7.04, and 7.06-7.0.x
While Magento 2.3.x is only compatible with PHP 7.1.3+
– M2 sites can be updated through Composer
– Make sure that Composer is installed on your system
– $ apt install composer (Ubuntu)
– $ yum install composer (CentOs)
– Magento 2 has built-in Varnish full page caching (FPC) capabilities
– These native capabilities can be enhanced with a Magento 2 Varnish extension that’s free for JetRails customers. Rather than updating configurations using bin/magento this extension allows for faster / improved site management, including:
– Adds Command Line Functionality to Magento Admin
– URL based purging
– Store based purging
– URL Excludes from Magento Admin
– Clustering of Varnish
– Composer repo access for installation & updates
– Catalog and Product Cache Refresh on Save
– Magento 2 is not intended to be run from the root directory. Instead, the /pub/ directory is intended to be set as the webroot. This helps to keep hackers out of your /var/, /setup/, and other directories that should not be publicly accessible.
– Magento Commerce (i.e. Magento Enterprise) websites can take advantage of database sharding. Instead of having one large database, you can split into 3 separate databases to spread which can have their own hosting resources. These include:
– OMS (Orders)
Have questions about Magento 2 hosting optimization and best practices to ensure site stability, security, speed, and scalability? Our team is here to help. Reach out for a free Magento hosting consultation!