Mon Jan 30 2023 04:49:45 GMT+0000 (Coordinated Universal Time)
Saved by @Jaimin047 #commands #magento
php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento indexer:reindex bin/magento cache:flush chmod -R 777 app/ var/ pub/ generated/
#wsl #wsl2 #windows #powershell #terminal #commands
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
#linux #commands
#commands #flags
# port forwarding -p (publish) # maps port from container to host # access port 80 on server on containers' port 80 docker run -p 80:80 docker/image # into OS - use console as if in OS environment -it
#commands #magento
sudo php bin/magento setup:upgrade sudo php bin/magento setup:di:compile sudo php bin/magento setup:static-content:deploy -f sudo php bin/magento indexer:reindex sudo php bin/magento cache:flush sudo chmod -R 777 app/ var/ pub/ generated/
#ubuntu #commands
# sudo apt-get update
#php #magento #document_root #resolve #module #include
<?php $mageRoot = __DIR__; while (!(file_exists($mageRoot . '/app/Mage.php') || file_exists($mageRoot . '/bin/magento'))) { $mageRoot = dirname($mageRoot); } return $mageRoot;
#javascript #nodejs #magento #document_root #resolve #module #mjs
import { realpathSync as realpath, accessSync as access, existsSync as exists } from 'fs' import { dirname } from 'path' /** * IIFE to resolve Magento document root * @returns <string> Returns Magento document root */ export const mageRoot = (() => { let mageRoot = dirname(realpath(import.meta.url.slice(7))) while (!(exists(`${ mageRoot }/app/Mage.php`) || exists(`${ mageRoot }/bin/magento`))) { mageRoot = dirname(mageRoot) } return mageRoot })()
#bash #magento #document_root #resolve #shell
#!/usr/bin/env bash # # Returns Magento document root if sourced or prints if launched as standalone # mageRoot="$(dirname $(realpath "${0}"))" while [[ ! -e ${mageRoot}/app/Mage.php && ! -e ${mageRoot}/bin/magento ]] do mageRoot="$(dirname $(realpath ${mageRoot}))" done return "${mageRoot}" 2>/dev/null || printf '%s' "${mageRoot}" && exit
#magento2 #xml #magento
path vendor/magento/theme-frontend-luma/etc/view.xml.
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments