Step 4. Upgrade

The components you’re upgrading display. The following figure shows an example.

Click upgrade to complete the task

To complete the upgrade, click Upgrade. If the upgrade is successful, a page similar to the following displays.

Your upgrade was successful

Messages similar to the following display in the Console Log:

Click to view the Console Log

Manually clear directories

After the upgrade completes, manually clear var subdirectories:

rm -rf <Magento install dir>/var/cache/*
rm -rf <Magento install dir>/var/page_cache/*
rm -rf <Magento install dir>/var/generation/* 

Restart Varnish

After the upgrade completes, restart Varnish if you use it for page caching.

service varnish restart

Then access your storefront and verify everything is working properly.

Errors after upgrade

After you finish your upgrade, errors might display.

  • On the main storefront page, the following error might display.

    We're sorry, an error has occurred while generating this email.
    
  • On a category page, the following error might display:

    We can't find products matching the selection.
    

If any of the preceding errors display, perform all of the following tasks.

Apply file system permissions and ownership

As part of the sample data upgrade process, you must apply current file system permission and ownership as discussed in the following sections. Failure to do so will cause your upgrade to fail.

For more information about file system ownership and permissions, see Overview of ownership and permissions.

One-user ownership and permissions

If you run the Magento application as one user (which is typical of shared hosting environments), change file system permissions and ownership as follows:

cd <your Magento install dir>
find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var vendor pub/static pub/media app/etc -type d -exec chmod g+w {} +
chmod u+x bin/magento

To optionally enter all commands on one line, enter the following assuming Magento is installed in /var/www/html/magento2:

cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod g+w {} + && chmod u+x bin/magento

After you set file system permissions, manually clear the var/cache, var/page_cache, and var/generation directories.

A sample command follows:

rm -rf var/cache/* var/page_cache/* var/generation/*

Two-user ownership and permissions

If you run the Magento application with two users, enter the following commands as a user with root privileges:

cd <your Magento install dir>
find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R :<web server group> .
chmod u+x bin/magento

To optionally enter all commands on one line, enter the following assuming Magento is installed in /var/www/html/magento2 and the web server group name is apache:

cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :apache . && chmod u+x bin/magento

Clear var directories

Clear the var/cache, var/page_cache, var/generation

A sample command follows:

rm -rf var/cache/* var/page_cache/* var/generation/*

Access your storefront again

After performing the preceding tasks, access your storefront again. If necessary, press Control+R to force the page to reload.