Our Feature Items: SM Market // SM AutoStore // SP Revo
Shopping cart (0)

How To Upgrade Magento 2 to The Latest Version - Run System Upgrade

Rate this item
(1 Vote)
Written by  Katy
Monday, 21 August 2017 16:26
How To Upgrade Magento 2 to The Latest Version - Run System Upgrade - 1.0 out of 5 based on 1 vote

Hi everyone, we come back! Magento 2.1.8 has recently been released. However, not all of us know how to upgrade the current version to the latest version because they are scared of unexpected errors during update/ installation. Thank to Magento.com for this useful artical. Now let's learn how to upgrade Magento 2 with us!

Actually, there are 2 main ways to do this upgrade. You can choose either of these following ways:

  • Using the System Upgrade utility, a wizard that walks you through the upgrade step by step; continue with this topic.
  • Use this method if you don’t have a to the Magento server’s file system or if you’re a non-technical user.

  • Using the command line.

Be noticed that This upgrade method is more advanced and it requires access to the Magento server’s file system.

System upgrade refers to updating the Magento 2.x core components and other installed components. To migrate from Magento 1.x to Magento 2, see the Migration Guide.

  • Authorization keys from a shared account cannot be used for upgrade. You must get your authorization keys from magento.com account owner.
  • If you installed the Magento application by cloning the GitHub repository, you cannot use the System Upgrade utility to upgrade the software. Instead, you must update it manually.

System Upgrade checklist

To be safe and avoid any unexpected errors happened during installation/ upgrade, do not forget these checklist:

  • You set up a Magento file system owner and shared that owner’s group with the web server user group
  • Your cron jobs are set up and running
  • File system permissions are set properly

Do not continue without performing these checks. Failure to do so could result in errors.

Magento file system owner and group

The Magento file system owner group must have write access to Magento directories and files.

Cron jobs are running

Magento requires three cron jobs, all running as the Magento file system owner.

To verify your cron jobs are set up properly, enter the following command as a user with root privileges:

crontab -u -l

For example, if your Magento file system owner is named magento_user, enter:

crontab -u magento_user -l

Results similar to the following should display:

* * * * * /usr/bin/php /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/magento2/var/log/magento.cron.log

* * * * * /usr/bin/php /var/www/magento2/update/cron.php >> /var/www/magento2/var/log/update.cron.log

* * * * * /usr/bin/php /var/www/magento2/bin/magento setup:cron:run >> /var/www/magento2/var/log/setup.cron.log

Another symptom of cron not running is the following error in the Magento Admin:

To see the error, you might need to click System Messages at the top of the window as follows:

For details, see Set up cron.

File system permissions

For security reasons, Magento requires certain permissions on the file system. Permissions are different from ownership

.

Ownership determines who can perform actions on the file system; permissions determine what the user can do.

Directories in the Magento file system must be writable by the Magento file system owner’s group.

To verify your file system permissions are set properly, either log in to the Magento server or use your hosting provider’s file manager application.

For example, enter the following commands on a Linux system if the Magento application is installed in /var/www/html/magento2:

ls -al /var/www/html/magento2

A sample result follows:

total 1028

drwxrwx---. 12 magento_user apache 4096 Jun 7 07:55 .

drwxr-xr-x. 3 root root 4096 May 11 14:29 ..

drwxrwx---. 4 magento_user apache 4096 Jun 7 07:53 app

drwxrwx---. 2 magento_user apache 4096 Jun 7 07:53 bin

-rw-rw----. 1 magento_user apache 439792 Apr 27 21:23 CHANGELOG.md

-rw-rw----. 1 magento_user apache 3422 Apr 27 21:23 composer.json

-rw-rw----. 1 magento_user apache 425214 Apr 27 21:27 composer.lock

-rw-rw----. 1 magento_user apache 3425 Apr 27 21:23 CONTRIBUTING.md

-rw-rw----. 1 magento_user apache 10011 Apr 27 21:23 CONTRIBUTOR_LICENSE_AGREEMENT.html

-rw-rw----. 1 magento_user apache 631 Apr 27 21:23 COPYING.txt

drwxrwx---. 4 magento_user apache 4096 Jun 7 07:53 dev

-rw-rw----. 1 magento_user apache 2926 Apr 27 21:23 Gruntfile.js

-rw-rw----. 1 magento_user apache 7592 Apr 27 21:23 .htaccess

-rw-rw----. 1 magento_user apache 6419 Apr 27 21:23 .htaccess.sample

-rw-rw----. 1 magento_user apache 1358 Apr 27 21:23 index.php

drwxrwx---. 4 magento_user apache 4096 Jun 7 07:53 lib

-rw-rw----. 1 magento_user apache 10376 Apr 27 21:23 LICENSE_AFL.txt

-rw-rw----. 1 magento_user apache 30634 Apr 27 21:23 LICENSE_EE.txt

-rw-rw----. 1 magento_user apache 10364 Apr 27 21:23 LICENSE.txt

-rw-rw----. 1 magento_user apache 4108 Apr 27 21:23 nginx.conf.sample

-rw-rw----. 1 magento_user apache 1427 Apr 27 21:23 package.json

-rw-rw----. 1 magento_user apache 1659 Apr 27 21:23 .php_cs

-rw-rw----. 1 magento_user apache 804 Apr 27 21:23 php.ini.sample

drwxrwx---. 2 magento_user apache 4096 Jun 7 07:53 phpserver

drwxrwx---. 6 magento_user apache 4096 Jun 7 07:53 pub

-rw-rw----. 1 magento_user apache 2207 Apr 27 21:23 README_EE.md

drwxrwx---. 7 magento_user apache 4096 Jun 7 07:53 setup

-rw-rw----. 1 magento_user apache 3731 Apr 27 21:23 .travis.yml

drwxrwx---. 7 magento_user apache 4096 Jun 7 07:53 update

drwxrws---. 11 magento_user apache 4096 Jun 13 16:05 var

drwxrws---. 29 magento_user apache 4096 Jun 7 07:53 vendor

In the preceding example, the Magento file system owner is magento_user. Directories in the Magento file system have drwxrwx--- permissions (775) and files have -rw-rw-rw- permissions (664).

To get more detailed information, you can optionally enter the following command:

ls -al /var/www/html/magento2/pub

Because Magento deploys static file assets to subdirectories of pub, it’s a good idea to verify permissions and ownership there as well.

For more information, see File system permissions and ownership.

Start System Upgrade

Prerequisites

Before continuing, complete all tasks discussed in Prerequisites.

If you're upgrading to version 2.1, see Upgrade to Magento version 2.1 (June 22, 2016).

Optional custom maintenance page

During the time you’re upgrading, your storefront is partially available. Users can see a list of files and so on but cannot shop or check out.

To avoid the appearance of a disabled site and to set up a custom maintenance page that displays during the upgrade, see Maintenance mode options for upgrade.

Start System Upgrade from the Magento Admin

To run System Upgrade:

  1. Log in to the Magento Admin as an administrator.
  2. Click System > Tools > Web Setup Wizard. The following page displays.
  3. Click System Configuration.
  4. If you haven’t already done so, enter your authentication keys in the provided fields.
  5. The following figure shows an example if you have already entered your keys.

  6. Click Save Config.
  7. Click System Upgrade.
  8. Magento begins searching for core module updates immediately. To also search for component updates, click Yes. A sample follows:

    The page displays similar to the following when we find components to upgrade.

  9. Continue with Step 1. Select versions to upgrade.

Error

The following error can indicate one of several issues, including that you haven’t entered your authentication keys in the Magento Admin:

For suggested solutions to other causes indicated by this message, see troubleshooting.

Sample data

The System Upgrade utility installs sample data for you but doesn’t display it, if you:

  • Used the magento sampledata:deploy command to download, but not installed sample data
  • You chose to update components at the same time as the Magento system software

Source: Magento.com

Google+
Joomla TemplatesFree Joomla TemplatesVirtuemart TemplatesK2 TemplatesJoomShopping TemplatesHikaShop TemplatesSobiPro TemplatesOpenCart Themes
Quà Tết Cao Cấp Hộp quà tết Giỏ quà tết Túi quà tết