Read More At: Mageprince Blog
You only need to run setup:upgrade command
1. When you made changes in Setup script(InstallData, InstallSchema,
UpgradeData, UpgradeSchema, ...)
2. If you install Magento first time.
3. At the time of new module installation
4. After upgrade magento version.
What will do setup:upgrade command
1) Check module version in ...
step 1 : cd [MAGENTO_ROOT]/shell/
You should replace [MAGENTO_ROOT] with your own absolute path to Magento root folder. For example /home/Thief/public_html/ Then list all files to see what we have here. Just enter simple command:
step 2 : ls -l
If you can find something like ‘indexer.php‘, that’s what we need and we can go on. To see the status of all ...
The default mode is neither here nor there.
The Magento team really wants you to use either Production Mode on your live site or Developer Mode during Development. The reason why Default Mode exists is to have something that would at least run reasonably when deployed directly from the downloaded code without further intervention.
By running php bin/...
To purge out-of-date items from the cache, you can clean or flush cache types:
Cleaning a cache type deletes all items from enabled Magento cache
types only. In other words, this option does not affect other
processes or applications because it cleans only the cache that
Disabled cache types are not cleaned.
Flushing a cache type purges the ...
You can use
Go to shell folder and run this cmd
php indexer.php --reindexall
php yourmagentofolder/shell/indexer.php -reindex catalog_product_attribute
php yourmagentofolder/shell/indexer.php -reindex catalogsearch_fulltext
php yourmagentofolder/shell/indexer.php -reindex catalog_category_flat
php yourmagentofolder/shell/indexer.php -...
The default mode is there only to install Magento 2.
It should not be used for development or production.
After installation you can only switch between dev and prod.
Source: Alan Kent @MagentoImagine2016
I finally found the solution to this problem in the Magento Community Forums, which was provided by @dunagan5887. I decided to share it here on magento.stackexchange.com as many may benefit from a well refered solution to this exception.
There is a link to the original Community Forum post: Email template with block
It seems that this solution, as quoted ...
I think system() function will be your friend, if you don't have permission of CLI.
To use this function , just simple create new file in your root server(Let's call it custom.php), then write below code in this file
system('php bin/magento cache:status'); // you can change it to your command
And run this script with http://your base url/custom.php
There is no difference between these two command.
php bin/magento command you are using php global variable to run command. for example if you are not set the global variable then you can give path of php like /opt/lampp/bin/php bin/magento to run the magento command.
bin/magento command will find the golbal php variable and ...
php bin/magento cache:clean
Cleaning a cache type deletes all items from enabled Magento cache types only. In other words, this option does not affect other processes or applications because it cleans only the cache that Magento uses.
Disabled cache types are not cleaned.
php bin/magento cache:flush
Flushing a cache type purges the cache storage, which ...
As a windows developer, in developer mode, Magento wants to create symbolic links to the static assets, but uses the Linux command and not the windows command. This creates a lot of errors in the js and css files.
To switch back to default mode, open:-
'MAGE_MODE' => 'developer',
'MAGE_MODE' => 'default',
I've created several useful commands, which are useful for us who develop Magento 2 sites on a daily basis. Magento 2 console commands are based on symphony, you can create commands for your personal/team use something like bin/magento cache:clean. This way you can execute the command directly from the terminal.
Here is a simple hello world command. Before ...
Short answer is yes you can do what you want.
The Magento console commands are built using Symfony (as you probably are aware).
The following is the example taken directly from the documentation.
protected function execute(InputInterface $input, ...
If you have upgraded to Magento version 2.2.* then
var/generation has been moved to generated/code
var/di has been moved to generated/metadata
There shouldn't be var/di and var/generation folders after the upgrade.
As CLI in Magento doesn't have an appropriate area, I figured out the following workaround:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<!-- Add this for sending email via cli -...
Short answer: Yes, you can.
But it is *nix command trick, Magento 2 does not support it by default as Marius answer.
You can execute the following command and it can do what you want.
php bin/magento module:status | grep VendorName_ | grep -v List | grep -v None | grep -v -e '^$'| xargs php bin/magento module:enable
You seem to be talking about the php bin/magento CLI tool.
This is something that is wonderful and indeed there is one for M1 - however its not built in and you need to add it to your server. Its called Mage Tools (what we call it around the office)
Is that the answer you were looking for?
Magento have different strategy to materialize static assets.Copy and Link. When you run setup:static-content:deploy this command use Copy strategy and file will be materialized in static folder and will not not change when you change original.
If you cleanup static folder and open page in browser Link strategy will be used and link on original file ...
For now you only have this way to apply changes. Magento should be apply changes to pub/static dir but it not. This still know bug. Hope it should be fix soon
You can apply new changes by command as like you do. This way will take some times but should work
My way when i modify js from my extension . I just go to pub dir and clear folder
php magento/bin cache:clean : It cleans a cache type = deletes all items from enabled Magento cache types only. This option does not affect other processed or applications because it cleans only the cache that Magento uses. Disabled cache types are not cleaned. Equivalent of clicking the Flush Magento Cache button in the backend.
To use when a modification ...