How to install magento 2.3.3
Tutorial by Mirko Zovko | 18. Oct. 2019.
Magento is one of the best ecommerce solutions on the market right now. In April 2018 they released 2.3 version of their software with many new features that include optimization, security, PWA and much more. Some of the main differences between magento 2.3 and 2.2 you can see in table below.
|Features||Magento 2.3(.3)||Magento 2.2|
|Progressive Web App (PWA)||yes||no|
|Asynchronous and Bulk Web API||yes||no|
|Multi Source Inventory||yes||no|
|Page builder integration||yes||no|
- web server you can use Apache 2.4 or Nginx 1.x.
- recommended database MySQL 5.6 or 5.7 but magento is also compatible with other databases like: MySQL NDB Cluster 7.4.*, MariaDB 10.0, 10.1, 10.2, Percona 5.7, and other binary-compatible MySQL technologies
- for magento 2.3.3 you need to use php 7.3 version and there is also lots of php extension that you need to install: ext-bcmath, ext-ctype, ext-curl, ext-dom, ext-gd, ext-hash, ext-iconv, ext-intl, ext-mbstring, ext-openssl, ext-pdo_mysql, ext-simplexml, ext-soap, ext-spl, ext-xsl, ext-zip and lib-libxml. If you have a problem, or don’t know how to install php extension you can check this link
- You also have to make some changes in php.ini to make everything perfect
- max_execution_time = 18000
- max_input_time = 300
- memory_limit = 2G
- precision = 14
- output_buffering = 4096
- zlib.output_compression = On
- zlib.output_compression_level = -1
After server is prepared you can start downloading latest magento and installing it. To download magento visit magento.com . There you can choose specific version or just download the latest one.
There is also an option to download the latest version with sample data. For this tutorial I’m going to use magento 2.3.3 without sample data, but later I’ll show you how to add sample data by composer.
I’m using Ubuntu for this tutorial, so some of the stuff will be related to it, but I’ll try not to write too much about it, and focus only on magento installation.
In your www folder create new folder for magento files and name it as you want then extract magento files in it. With all that in place you can access magento installation by typing http://localhost/NAME_OF_YOUR_FOLDER_WITH_MAGENTO in your browser. If you want you can also create domain for your localhost by editing hosts file. In my case I'm going to use magento233 as folder and as domain I added to hosts magento233.local to use as domain.
Clicking on button Agree and Setup Magento we are starting with magento installation.
First step will check your setting, and tell you if you have some problems with it. If everything is ok you will see screen like this and you are ready for the next step.
Second step is adding a database, so you have to open your database management and create empty database and add it user to it, or you can just use root use like I did.
In the third step you are setting up your store web address (domain) and you have to be careful here. If you use localhost with your name you need to add there
http://localhost/NAME_OF_YOUR_FOLDER_WITH_MAGENTO/ in my case http://magento233.local/ . For admin link if you are using this locally just use admin, so that you don't forgot that url, or if you are using this in the production then use something else. Also one more tip, do not forget "/" at the end of the your domain.
Four step contain time zone, currency and store default language. But for now you can just leave it with default values and change it later in admin panel if you need.
For fifth step you just need to enter you user name and email address for admin user of your magento application.
When you complete fifth step you are basically over with all of the fist settings that you need to add. Now you only need to click on Install now button and wait installation to complete itself.
After installation is completed you will get this screen with all information for admin, database and links. It's good to save this information so you can know for sure what to use but in most of the cases you will know that information without saving it.
With magento installation you can get multiple problems, I'll write some of the most common here so that you know what to do if you get one of them.
- most common problem is that css not loading itself. For that there is multiple different solutions
- in terminal for ubuntu enable: sudo a2enmod rewrite , and do not forget to restart apache after running first command
- setting up right folder and files permissions, for that you can check solution on magento.stackexchange
- delete generated files, sessions and caches, navigate to the next paths and delete everything
- magento_root/var/cache/DELETE ALL
- magento_root/var/page_cache/DELETE ALL
- magento_root/var/session/DELETE ALL
- magento_root/var/view_preprocessed/DELETE ALL
- deploy static files with command: php -d memory_limit=-1 bin/magento setup:static-content:deploy
- remove all files form magento_root/pub/static except .htaccess, go to magento_root/app/etc/di.xml and replace Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink with Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
- if you see "Fatal error: Maximum function nesting level of '100' reached, aborting!"
- Disable the xdebug extension.
- xdebug.max_nesting_level set to 200
- restart appache
I think with this I cover most common problem with installation of magento. If you got some other problem and found solution for it feel free to contact us so we can share with others your solution.
There is one more thing that I didn't tell you, and that is how to add sample data to your magento. I already told you in beginning that you can directly download latest magento with sample data. and with that you can just proceed with normal installation for magento. But if you already installed magento without sample data and you want to add sample data additionally there is very simple way to do that. You need to open terminal, navigate to your magento root folder and run comand php bin/magento sampledata:deploy . That command will add all of the necessary data to your magento for sample data. After that you need to run few more commands:
- php bin/magento setup:upgrade
- php bin/magento setup:di:compile
- php bin/magento setup:static-content:deploy
- php bin/magento indexer:reindex
- php bin/magento cache:clean
- php bin/magento cache:flush
You have successfully installed you magento with sample data. I hope that this article was helpful and that you like it, if you have some comments on it and want me do add something more or to write some other related article feel free to contact us.