How do I install Magento 2.4 to Windows?

Step 1

  1. How to fix the «Invalid template file» / «require_js.phtml» failure in Windows?
  2. How to fix catalog images in Magento ≥ 2.3.5 in Windows?
    1. It also solves: How to fix «Unable to apply data patch Magento\Theme\Setup\Patch\Data\RegisterThemes for module Magento_Theme» in Magento ≥ 2.3.5 in Windows?
  3. How to fix «file_put_contents(generated/metadata/primary|global|plugin-list.php): failed to open stream: No such file or directory in lib\internal\Magento\Framework\Interception\PluginListGenerator.php on line 414» in Magento 2.4-develop in Windows?
  4. How did I fix «Unable to apply data patch Magento\CatalogUrlRewrite\Setup\Patch\Data\UpdateUrlKeyForProducts» while upgrading Magento to 2.4.0? (is is not needed for Magento ≥ 2.4.3 )
  5. How to fix interceptors generation on bin/magento setup:di:compile in Magento ≥ 2.2 in Windows?

Step 2

bin/magento setup:install \
    --admin-email=admin@mage2.pro \
    --admin-firstname=Dmitrii \
    --admin-lastname=Fediuk \
    --admin-password=Za1112Uj \
    --admin-use-security-key=0 \
    --admin-user="Dmitrii Fediuk" \
    --backend-frontname=admin \
    --base-url-secure=https://localhost.com:2237/ \
    --base-url=https://localhost.com:2237/ \
    --currency=USD \
    --db-host=127.0.0.1 \
    --db-name=justuno_3_245p1 \
    --db-password=vertrigo \
    --db-user=root \
    --elasticsearch-host=127.0.0.1 \
    --elasticsearch-index-prefix=justuno_3_245p1 \
    --language=en_US \
    --search-engine=elasticsearch7 \
    --session-save=files \
    --timezone=Europe/Istanbul \
    --use-rewrites=1 \
    --use-secure-admin=1 \
    --use-secure=1

Step 3

bin/magento config:set admin/captcha/enable 0
bin/magento config:set admin/security/password_lifetime ''
bin/magento config:set admin/security/session_lifetime 31536000
bin/magento config:set admin/security/use_form_key 0
bin/magento config:set admin/url/custom ''
bin/magento config:set admin/url/use_custom 0
bin/magento config:set catalog/search/engine elasticsearch7
bin/magento config:set contact/email/recipient_email admin@mage2.pro
bin/magento config:set dev/css/merge_css_files 0
bin/magento config:set dev/css/minify_files 0
bin/magento config:set dev/image/default_adapter GD2
bin/magento config:set dev/js/enable_js_bundling 0
bin/magento config:set dev/js/merge_files 0
bin/magento config:set dev/js/minify_files 0
bin/magento config:set dev/static/sign 0
bin/magento config:set msp_securitysuite_recaptcha/backend/enabled 0
bin/magento config:set msp_securitysuite_recaptcha/frontend/enabled_login 0
bin/magento config:set sales_email/creditmemo/copy_to ''
bin/magento config:set sales_email/creditmemo_comment/copy_to ''
bin/magento config:set sales_email/invoice/copy_to ''
bin/magento config:set sales_email/invoice_comment/copy_to ''
bin/magento config:set sales_email/order/copy_to ''
bin/magento config:set sales_email/order_comment/copy_to ''
bin/magento config:set sales_email/shipment/copy_to ''
bin/magento config:set sales_email/shipment_comment/copy_to ''
bin/magento config:set system/full_page_cache/caching_application 1
bin/magento config:set trans_email/ident_custom1/email admin@mage2.pro
bin/magento config:set trans_email/ident_custom2/email admin@mage2.pro
bin/magento config:set trans_email/ident_general/email admin@mage2.pro
bin/magento config:set trans_email/ident_sales/email admin@mage2.pro
bin/magento config:set trans_email/ident_support/email admin@mage2.pro
bin/magento config:set web/cookie/cookie_domain ''
bin/magento config:set web/cookie/cookie_lifetime 9999999
bin/magento config:set web/cookie/cookie_path ''
bin/magento module:disable Dotdigitalgroup_Chat
bin/magento module:disable Dotdigitalgroup_Email
bin/magento module:disable Magento_NewRelicReporting
bin/magento module:disable Magento_Signifyd
bin/magento module:disable Magento_TwoFactorAuth
bin/magento module:disable Temando_Shipping
bin/magento module:disable Vertex_AddressValidation
bin/magento module:disable Vertex_Tax
bin/magento module:disable Yotpo_Yotpo
bin/magento cache:clean

Step 4

UPDATE `sales_sequence_profile` SET suffix = '-DF<port>';

Step 5

rm -rf pub/static/*
bin/magento setup:static-content:deploy \
	--area adminhtml \
	--theme Magento/backend \
	-f en_US
bin/magento setup:static-content:deploy \
	--area frontend \
	--theme Magento/luma \
	-f en_US

Could someone with enough skills in windows shell do a little script to automatise the 4 first points ?
So we don’t have to do it at each composer update :slight_smile: