How to install Magento 2.4 and build a web server - Magento 2 Tutorial

How to install Magento 2.4 and build a web server – Magento 2 Tutorial


install magento 2 shared hosting

► Article:
► Mirasvit:
► New Live Streams (Behind The Scenes):

00:00 Introduction
03:52 Build a basic server
08:48 Convert to a web server for Magento 2.4
19:58 Create a database for installing Magento 2.4
21:17 Enable SMTP Capability
23:05 Install Elasticsearch 7
28:22 Download Magento 2.4.0 with Composer
35:17 Install Magento 2.4 via the Command Line
41:22 Bonus – Install Sample Data

POPULAR PLAYLISTS
► Magento 2 Tutorials for Beginners:
► Magento 2 Quick Tips:
► Let’s Build a Magento 2 Store (Series 1):
► Let’s Build a Magento 2 Store (Series 2):

MAGENTO 2 SPECIAL OFFERS
► 20% off Managed Hosting (Cloudways): (Promo: DS20)
► Free Credit on Unmanaged Hosting (DigitalOcean):
► Up to 30% off Extensions:

SPONSOR ENQUIRIES:
► Sponsor a video:
#magento #magentotutorials

44 thoughts on “How to install Magento 2.4 and build a web server – Magento 2 Tutorial

  1. Hi Craig. Thanks for the video. It is a really organised video with good tips.
    I am receiving this error when running bin/magento setup:upgrade
    Unable to apply data patch MagentoCatalogRuleSampleDataSetupPatchDataInstallCatalogRuleSampleData for module Magento_CatalogRuleSampleData. Original exception message: Rolled back transaction has not been completed correctly.
    What could be the reason

  2. hello can i help me i installed magento-ce-2.4.0_sample_data-2020-07-26-02-27-05 in windows
    admin is displayed all blackand i have this probleme http://localhost/magento2-4/

    1 exception(s)
    Exception #0 (MagentoFrameworkExceptionValidatorException): Invalid template file: 'C:/xampp/htdocs/magento2-4/vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml' in module: '' block's name: 'require.js'

    Exception #0 (MagentoFrameworkExceptionValidatorException): Invalid template file: 'C:/xampp/htdocs/magento2-4/vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml' in module: '' block's name: 'require.js'

    <pre>#1 MagentoFrameworkViewElementTemplate->_toHtml() called at [vendormagentoframeworkViewElementAbstractBlock.php:1111]

    #2 MagentoFrameworkViewElementAbstractBlock->MagentoFrameworkViewElement{closure}() called at [vendormagentoframeworkViewElementAbstractBlock.php:1115]

    #3 MagentoFrameworkViewElementAbstractBlock->_loadCache() called at [vendormagentoframeworkViewElementAbstractBlock.php:675]

    #4 MagentoFrameworkViewElementAbstractBlock->toHtml() called at [vendormagentoframeworkViewResultPage.php:249]

    #5 MagentoFrameworkViewResultPage->render(&MagentoFrameworkAppResponseHttpInterceptor#000000003d9995b90000000011c06ad7#) called at [vendormagentoframeworkViewResultLayout.php:171]

    #6 MagentoFrameworkViewResultLayout->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#000000003d9995b90000000011c06ad7#) called at [vendormagentoframeworkInterceptionInterceptor.php:58]

    #7 MagentoFrameworkViewResultPageInterceptor->___callParent('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#000000003d9995b90000000011c06ad7#)) called at [vendormagentoframeworkInterceptionInterceptor.php:138]

    #8 MagentoFrameworkViewResultPageInterceptor->MagentoFrameworkInterception{closure}(&MagentoFrameworkAppResponseHttpInterceptor#000000003d9995b90000000011c06ad7#) called at [vendormagentoframeworkInterceptionInterceptor.php:153]

    #9 MagentoFrameworkViewResultPageInterceptor->___callPlugins('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#000000003d9995b90000000011c06ad7#), array(array('deferJsToFooter', 'result-messages', 'result-builtin-c…', 'result-varnish-c…'))) called at [generatedcodeMagentoFrameworkViewResultPageInterceptor.php:95]

    #10 MagentoFrameworkViewResultPageInterceptor->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#000000003d9995b90000000011c06ad7#) called at [vendormagentoframeworkAppHttp.php:120]

    #11 MagentoFrameworkAppHttp->launch() called at [generatedcodeMagentoFrameworkAppHttpInterceptor.php:23]

    #12 MagentoFrameworkAppHttpInterceptor->launch() called at [vendormagentoframeworkAppBootstrap.php:263]

    #13 MagentoFrameworkAppBootstrap->run(&MagentoFrameworkAppHttpInterceptor#000000003d9995b00000000011c06ad7#) called at [index.php:39]

    </pre>

  3. Hey Craig, you are wonderful, perfect and super a person.. Thanks for your video.. Everything is step by step and sure article.. You are crazy a man :)) Bravo for patient!

  4. Degraded composer to 1.10.16 but still facing the below error –
    Problem 1

    – Root composer.json requires magento/composer-root-update-plugin ~1.0 -> satisfiable by magento/composer-root-update-plugin[1.0.0].

    – magento/composer-root-update-plugin 1.0.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

    Problem 2

    – Root composer.json requires dealerdirect/phpcodesniffer-composer-installer ^0.5.0 -> satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0].

    – dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

    Problem 3

    – laminas/laminas-dependency-plugin[1.0.0, …, 1.0.4] require composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

    – magento/product-community-edition 2.4.0 requires laminas/laminas-dependency-plugin ^1.0 -> satisfiable by laminas/laminas-dependency-plugin[1.0.0, …, 1.0.4].

    – Root composer.json requires magento/product-community-edition 2.4.0 -> satisfiable by magento/product-community-edition[2.4.0].

    You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2
    Request to help on this.

  5. I would like to know what is giving this error help me
    [email protected]:/var/www/html$ find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :www-data . && chmod u+x bin/magento
    find: ‘var’: No such file or directory
    find: ‘generated’: No such file or directory
    find: ‘vendor’: No such file or directory
    find: ‘pub/static’: No such file or directory
    find: ‘pub/media’: No such file or directory
    find: ‘app/etc’: No such file or directory

  6. I get an error that says "SQLSTATE[HY000] [1045] Access denied for user 'magento'@'localhost' (using password: YES)"

    bin/magento setup:install

    –base-url=http://127.0.0.1

    –db-host=localhost

    –db-name=magento

    –db-user=magento

    –db-password="magneto"

    –admin-firstname=Nikheel

    –admin-lastname=Rajman

    [email protected]gmail.com

    –admin-user=data

    –admin-password=password

    –language=en_US

    –currency=ZAR

    –timezone=Africa/Johannesburg

    –use-rewrites=1

  7. Super great tutorial, Very easy to understand just follow step by step. Thank you. I have some question to ask. How different between your step to install one by one and Install via DirectAdmin? Your way look more clean install. It's make our website faster? Thank you again.

  8. HI Craig,
    Thanks for the tutorial. I hit a snag however whilst installing magento with composer:

    Your requirements could not be resolved to an installable set of packages.

    Problem 1
    – Root composer.json requires magento/composer-root-update-plugin ~1.0 -> satisfiable by magento/composer-root-update-plugin[1.0.0].
    – magento/composer-root-update-plugin 1.0.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    Problem 2
    – Root composer.json requires dealerdirect/phpcodesniffer-composer-installer ^0.5.0 -> satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0].
    – dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    Problem 3
    – laminas/laminas-dependency-plugin[1.0.0, …, 1.0.4] require composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    – magento/product-community-edition 2.4.0 requires laminas/laminas-dependency-plugin ^1.0 -> satisfiable by laminas/laminas-dependency-plugin[1.0.0, …, 1.0.4].
    – Root composer.json requires magento/product-community-edition 2.4.0 -> satisfiable by magento/product-community-edition[2.4.0].

    You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2

  9. Hello, Craig That is great Thanks! After I upgrade from 2.3.4 to 2.4. everything is ok, but 5-6 hours later all products disappear from category, Ihave to restart elasticsearch. It will have the same problem 5-6 hours later.
    in exception log : [2020-10-31 03:20:23] main.CRITICAL: No alive nodes found in your cluster {"exception":"[object] (Elasticsearch\Common\Exceptions\NoNodesAvailableException(code: 0): No alive nodes found in your cluster at /var/www/html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:50)"} [
    Could you please give me some direction?

  10. I did all your steps but when I try to install Magento with composer, there is an error: Your requirements could not be resolved to an installable set of packages.

    Problem 1

    – Root composer.json requires magento/composer-root-update-plugin ~1.0 -> satisfiable by magento/composer-root-update-plugin[1.0.0].

    – magento/composer-root-update-plugin 1.0.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

    Problem 2

    – Root composer.json requires dealerdirect/phpcodesniffer-composer-installer ^0.5.0 -> satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0].

    – dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

    Problem 3

    – laminas/laminas-dependency-plugin[1.0.0, …, 1.0.4] require composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

    – magento/product-community-edition 2.4.0 requires laminas/laminas-dependency-plugin ^1.0 -> satisfiable by laminas/laminas-dependency-plugin[1.0.0, …, 1.0.4].

    – Root composer.json requires magento/product-community-edition 2.4.0 -> satisfiable by magento/product-community-edition[2.4.0].

    You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

    I searched information and there are people who say that is because of my PHP version, but I installed the same of u.. What can i do? Thank you very much!

  11. am using ubuntu 16 and M2 2.3.5 and a bunch of extensions up and running. and mysql 5 i think. it would not be wise to upgrade if most of my extensions are not in the 2.4 version right? is it safe to install m 2.3 in ubuntu 20?

  12. Supa video! And pretty well explained
    Just wanted to add that you can disable TwoFactor authentication, if you don't need it. Once you installed Magento it can be disabled using following command: php binmagento module:disable -c Magento_TwoFactorAuth
    As most of the time it's not needed especially on development stage

  13. Hi Craig, I started again from the very start.. this time the email from "[email protected]example.com" arrived in my gmail spam folder 6 hours later, I tried the link but I think it may have timed out because it redirected me to the Magento log in, so I tried to log in and up came the message about 2 step etc. so this time I received the email in my gmail spam folder within 10 minutes, so far so good. I then took a snapshot and tried to install the sample data, every thing went well until I ran the " bin/magento setup:upgrade" it completed the upgrade but at the end these was a RED note: "Could not validate a connection to Elasticsearch. No alive nodes found in your cluster" can you help? thanks you..

  14. Hi Craig, thanks for your very useful video(s) :> I was using AWS EC2 host (instead of digital ocean), using ubuntu 18.04, and eventually had to use the 2VCPU, 4G ram (as you had mentioned ElasticSearch takes mem); Also order to install the sample content, I had to create additional swaps for linux (file swaps, outlined here: https://stackoverflow.com/questions/20667761/composer-killed-while-updating ) otherwise the process will be 'killed' due to insufficient memory; I was also unable to use the postfix to send out any email (it timed out connecting to my email provider on port 25), so instead had to 'look' into the postfix email itself, (on sudo) first by listing (mailq), and then getting the [mailid] and running postcat -vq [mailid] to get the inital mail for the authenticator. Otherwise, I have it running! Thanks again, if you do come to TH, please give me a buzz!

Leave a Reply

Your email address will not be published. Required fields are marked *