Monthly Archives: January 2020
Modules in the Magento 2 file structure
Module files in Magento 2 are located in 2 directories.
1. app/code/<VendorName>/<ModuleName>/ 2. vendor/<vendor-name>/<module-name>/
Vendor Name — is the name of the company/person that developed the module. In some cases, the name of the vendor may coincide with the name of the customer's company. Therefore, before developing a new module, the name should be agreed upon. In the examples, we use our name — Magefan.
Module files developed on order or modules from other companies installed via FTP are located in the app/code folder.
The vendor folder contains Magento 2 root modules, as well as modules installed using the Web Setup Wizard or Composer. You will find the Magento root modules in the vendor/magento folder.
Interesting to know:
In the Magento 2 repository (dev branch) on GitHub (https://github.com/magento/magento2), all root modules are in the app code/Magento folder. And all PHP libraries are in lib/internal/Magento.
This structure was used during the Magento 2 development, long before the vendor folder existence and official release. For convenience, this structure is still used on GitHub.
To work with phpMyAdmin you need to have the webserver configured. If it is not installed use this guide.
In this article, we will describe 2 phpMyAdmin installation methods:
1. Download phpMyAdmin from the official website.
It is suitable for everyone, regardless of the operating system. To get started, go to the downloads section of phpmyadmin.net and download the archive with the latest available version of phpMyAdmin to your computer.
If you want to set up a web server and look for some tips, this article is for you. Here are instructions for setting up a web server (LAMP = Linux + Apache + MySql + PHP) on OS Ubuntu 20.04, in connection with:
Apache 2
PHP 8
Mysql Sever 8
If you decided to remove Magento 2 Dynamic Blocks and Pages, please follow the steps below. You can contact our team for a free consultation in case you have any issues with Magefan's extension.
Remove Extension Files
Removing files instruction depends on the way CMS display rules extension has been installed in.
1. If you can find the extension files in the folder
app/code/Magefan/CmsDisplayRules
then remove this folder.
2. If the extension was installed via the composer and its files located in the folder
vendor/magefan/module-cms-display-rules
then run composer CLI command to remove it
composer remove magefan/module-cms-display-rules
Once extension files have been removed, run these Magento CLI commands:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these zero downtime deployment commands for Magento 2.
Remove Extension Data (optional)
Attention!
If you need to update Magento 2 Dynamic Blocks and Pages by Magefan, please follow the steps below.
Note: the updating instructions depend on the method the CMS display rules extension was installed with.
Update using composer
If the CMS display rules module was installed via the composer (check if vendor/magefan/module-cms-display-rules
folder exists), then you need to run these simple CLI commands in Magento 2 directory:
composer remove magefan/module-cms-display-rules
composer require magefan/module-cms-display-rules
^x.x.x
# replace x.x.x with the version you want to use
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these zero downtime deployment commands for Magento 2.
Update using archive and FTP
If the CMS display rules module was installed via FTP (check if app/code/Magefan/CmsDisplayRules
folder exists), then follow these commands:
You can install Magento 2 Dynamic Blocks and Pages by Magefan, using composer or archive installation methods.
Do you want us to install the CMS Display Rule extension for you? Let our technical engineers do it – check out our installation service.
Installation via composer (recommended)
Please navigate to your Magefan Account > My Downloads > Install via Composer to get the composer installation instructions.