How to Install NitroPack for Magento via Packagist

The NitroPack extension for Magento brings the ultimate site speed and performance optimization package to your Magento store.

Read on to get started on installation, settings, configurations, and features.

How NitroPack works?

With the NitroPack extension for Magento, you can provide an excellent user experience through fully-automated site speed optimizations.

NitroPack’s superior site speed features allow you to serve optimized pages to every single visitor on any screen size, regardless of location, device, or network strength.

The extension automatically crawls, renders, and saves cached versions of your original files and pages, which significantly descreses CPI and load times for an exceptional user experience at your Magento store.

License: MIT

Dependencies: 

Magento Open Source >= v2.3.0

Magento Commerce >= v2.3.0

NitroPack: Subscription and Account Setup

To use NitroPack, you must create an account first. Your account is used to manage the websites you connect to NitroPack.

To create your account:

  1. Go to https://nitropack.io/pricing

  2. Choose a plan. If you need help with that, please refer to our article on how to choose the right pricing plan. You can upgrade to a higher plan at any point.

1_NP_PricingPlans.jpg

  1. Among other details (e.g., email, password, name), you will need to provide website name and website URL. Please enter the exact URL you’ve used for your webstore in Magento. Otherwise, you won’t be able to connect it to the NitroPack optimization service.

2_Susbcription_WebsiteRegistration.jpg

Finalize your order, and you’re done! You’ve successfully created your NitroPack account.

Install NitroPack for Magento (via Composer)

The Installation can be done with the help of Composer - a dependency manager for PHP you need to have installed on your store server to start working with NitroPack for Magento.

Once you have the Composer set up, please perform all the steps below:

Step 1: Back up your server

Follow the instructions for backing up your store(s) as described in Adobe Experience League.

⚠️ Please don’t exit Maintenance mode after backup (as described in the help document), as you will continue with the NitroPack extension installation.

Step 2: Set pre-install file permissions

Configure all file system access permissions and set up the owner(s) of the Commerce file system for a development and production system as described in Adobe Experience League.


Step 3: Enable developer mode

Switch to developer mode from production mode (and vice versa) following the instructions as per the Adobe Experience League.

📍Now that you’ve met all the above conditions, you can continue with the NitroPack extension's installation.

Step 4: Update your Composer file with the NitroPack extension

First, you’ll need to add the extension’s name and version to your composer.json file. To do that, navigate to your server terminal console and run the following command:

composer require nitropack/magento2-extension

3_Command_CoposerRequire.jpg

📍Depending on your server admin permissions, you may need to enter your authentication keys. Your public key is your Magento username; your private key is your password.


Step 5: Register and compile the NitroPack extension

To register and compile the NitroPack extension, run the following command in your server terminal console:

bin/magento setup:upgrade

bin/magento setup:di:compile

The commands register the Magento 2 extension and update the Magento database schema and data, and compile Magento code (as shown in the screenshot below).

4_Command_UpgradeCompile_result.jpg

 

Step 6: Verify that the NitroPack extension is enabled

Next, check if the NitroPack extension is active.

Run the following command:

php bin/magento module:status NitroPack_NitroPack

The output below means the NitroPack extension has been enabled successfully:

5_Verify_NP_Enabled_SuccessResult.jpg

In case of a negative message showing that the extension is still disabled, run the following command:

php bin/magento module:enable NitroPack_NitroPack

This command should automatically enable the NitroPack extension and serve you with a success message “Module is enabled.”

Step 7: Clean the store cache

The existing Magento cache for your store contains store-specific settings in the file system and database, which are no more relevant after a new extension has been installed. 

It is a good practice to clear the cache after installing a new extension or upgrading to the latest version of Magento.

Run the following command:

php bin/magento cache:clean


Step 8: CRON setup

CRON is a utility program that lets users or systems input commands for scheduling tasks repeatedly at a specific time. Tasks scheduled in CRON are called Cronjobs. NitroPack extension uses CRON to maintain the cache update process of your website in case of changes.

If you have CRON already installed, please skip the installation process.

CRON Installation and Configuration

To work correctly, the NitroPack extension requires a CRON to be installed and run on the server. Information about how to run CRON can be found here.

After the Cron has been installed, create a Commerce crontab allowing Cron jobs to be configured.

Run the following command:

php bin/magento cron:install

“Crontab has been generated and saved” indicates the command was successfully applied.

7_CronInstalled_result.jpg


Step 9: Exit the site Maintenance Mode

Once you’ve performed all the abovementioned steps, put your store out of the “Maintenace mode.”

Run the following command:

php bin/magento maintenance:disable

The following message confirms you’ve disabled Maintenance mode successfully.

9_MaintenaceMode_Disabled_result.jpg

 

Connect NitroPack for Magento with your NitroPack account

📍Make sure you have an active NitroPack account

To optimize your site, the NitroPack extension for Magento has to be connected to the site URL existing in your NitroPack Account at nitropack.io.

If you still do not have a NitroPack account, visit the NitroPack website and choose a subscription plan that best fits your needs. Enter your details, making sure the website URL matches the one you have listed for your webstore in Magento.

Finalize the order and proceed with connecting your webstore to the NitroPack account.

Step 1: Navigate to the NitroPack extension for Magento

Go ahead and log into the Magento admin panel:

10_MagentoConnect_mainScreen.jpg

Navigate to the sidebar menu and click on System. There, find your NitroPack extension section and click Settings.

11_Magento_NP_Menu.jpg

This will open your NitroPack extension dashboard in Magento for your store.

📍If you have multiple stores, the default one will be displayed. To switch between stores, use the drop-down button next to your “Store” field.

12_NP_SelectStore_dropdown.jpg


Step 2: Connect the store to your NitroPack account

Select the store you want to connect, click the “Connect to NitroPack” button, and follow the instructions.

13_NP_ConnectScreen.jpg

Next, log in to your NitroPack account with your email and password. All the webstore URLs registered in your NitroPack account will be displayed.

14_NP_ConnectScreen_LoginToNP.jpg

Choose the one you want to connect your store to and click the “Connect” button.

15_NP_ConnectScreen_ConnectWebsite.jpg

📍If you want to connect another store to your NitroPack account, repeat the steps from above.

⚠️ If CRON is not installed and/or configured correctly, you will receive the following error message on the NitroPack extension page: 

16_Error_CRONnotInstalled.jpg

Please note the extension will be disabled until the problem is fixed.

To resolve the error, run the following command:

php bin/magento cron:install


Contact the NitroPack Support team
to resolve persisting errors and questions regarding your NitroPack extension for Magento.

Step 3: Change Cache Settings

To work properly, the NitroPack extension will automatically check for the following settings:

  1. NitroPack to be selected as a Caching application in the “Full Page Caching Application” settings
  2. Page Cache to be enabled in the “Full Page Caching” settings

If changes are needed, you will see either (or both) of the following ❗Warning messages inside your NitroPack extension’s dashboard:

17_Error_Full_Page_Caching_Application_settings.jpg

18_Error_Full_Page_Cache_settings.jpg

Simply click the “Apply Fix Automatically” button, and NitroPack will make all the changes for you.

Alternatively, you can make the required changes on your own, but to avoid issues, the automatic fix is recommended.

✅ All done!

Your store is now connected to your NitroPack account, and our extension can automatically start optimizing it. You will start seeing data inside your NitroPack extension dashboard shortly.

20_NP_extension_FullView.jpg

Please remember, regardless of the issue or question you might be facing, our technical experts are available 24/7 and try to review tickets in 20 minutes or less.

Use our Help Center form to submit a ticket and resolve any issue quickly and securely.

 

Do you have a Redis load balancer?

In case your webstore has a Redis load balancer installed, some extra configuration is required for Redis to work properly with the NitroPack extension for Magento.

Follow the configuration steps listed in our article.

Further Reading:

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.