This tutorial shows the steps to change the 'Default Welcome Message' as of Magento 2.1.x and also shows how to clear the Magento cache.
< geek; ecom; media buying; meditation; music; photography; chess; et al />
Search blog
Sunday, November 13, 2016
Change 'Default Welcome Message' in Magento 2.1.x & Cleaning Cache
This tutorial shows the steps to change the 'Default Welcome Message' as of Magento 2.1.x and also shows how to clear the Magento cache.
Thursday, November 10, 2016
Magento 2 CLI/Terminal Commands
Commands for Magento 2x
If you are a Terminal/CLI ninja and have been seeking for nifty CLI commands, head forward!
Note: You may/may not have to enter 'sudo', depending on your folder permission settings. In my case I had to so I have added 'sudo' before each of my command.
>> To view Magento Help Commands: php bin/magento
>> To view Magento Version: php bin/magento --version
>> To REINDEX CACHE: php bin/magento indexer:reindex
>> To Clean Cache: php bin/magento cache:clean
- Cache Options: config , layout , block_html , collections , reflection , db_ddl , eav , customer_notification , full_page , config_integration , config_integration_api , translate , config_webservice
- Cache Options Usage:
- php bin/magento cache:clean
- php bin/magento cache:flush
- php bin/magento cache:enable
- php bin/magento cache:disable
- php bin/magento cache:status
- Sets maintenance mode exempt IPs: php bin/magento maintenance:allow-ips your_ip_address1 ip_address2
- Disable Allowed IPs: php bin/magento maintenance:enable --ip=none
- Disables maintenance mode: php bin/magento maintenance:disable
- Enable maintenance mode: php bin/magento maintenance:enable
- Displays maintenance mode status: php bin/magento maintenance:status
>> Info:
- Displays the Magento Admin URI: php bin/magento info:adminuri
- Displays the list of available currencies: php bin/magento info:currency:list
- Displays the list of available language locales: php bin/magento info:language:list
- Displays the list of available timezones: php bin/magento info:timezone:list
>> Admin Solutions:
- Change Magento Admin URL/URI: Please check my post at: http://www.evagabond.me/2016/12/change-admin-uri-url-magento-2.html
- Create Admin User from Terminal in Magento 2.x: http://www.evagabond.me/2016/12/create-admin-user-from-terminal-in.html
>> Module:
NOTE: If you are disabling a module, first & foremost, check whether the particular module has any circular dependency.
php bin/magento info:dependencies:show-modules-circular
The command above will generate one CSV file, please analyze this and make a decision. The file will be located in your DOCUMENT_ROOT folder bearing the filename 'modules-circular-dependencies.csv'. Also, while disabling an extension using the command below, it will throw an exception, if it has a circular dependency. - Source: https://magento.stackexchange.com/a/238338/58152
- Disables specified modules: php bin/magento module:disable module_name --clear-static-content
- Enables specified modules: php bin/magento module:enable module_name --clear-static-content
- Displays status of modules: php bin/magento module:status
- Uninstalls modules installed by composer: sudo php bin/magento module:uninstall
>> Setup:
- Run CRON for Setup Application: php bin/magento setup:cron:run
- Installs and upgrades data in the DB: php bin/magento setup:db-data:upgrade
- Installs and upgrades the DB schema: php bin/magento setup:db-schema:upgrade
- Checks if DB schema or data requires upgrade: php bin/magento setup:db:status
- Generates DI configuration and all missing classes that can be auto-generated: php bin/magento setup:di:compile
- Installs the Magento application: php bin/magento setup:install
- Rolls back Magento Application codebase, media and database: php bin/magento setup:rollback
- Deploys static view files: php bin/magento setup:static-content:deploy
- Installs the store configuration: php bin/magento setup:store-config:set
- Uninstalls the Magento application: php bin/magento setup:uninstall
- Upgrades the Magento application, DB data, and schema: php bin/magento setup:upgrade
>> Backup:
- Takes BACKUP of Magento Application code base, media and database: php bin/magento setup:backup
- View various backup options available: php bin/magento| grep backup
- View various backup options in detail: php bin/magento setup:backup --help
php bin/magento setup:backup --code --db
- Enable: php bin/magento config:set system/backup/functionality_enabled 1
- Disable: php bin/magento config:set system/backup/functionality_enabled 0
>> Theme:
Uninstall Theme: php bin/magento theme:uninstall theme_name
Probably the above method is only applicable to themes that have been installed using composer. For other themes that haven't been installed using composer, please refer to the methods below:
An important point I noticed from Reference 2 was this SQL query:
There is a table in database named as theme.You can use the below code to delete your theme:
USE dbname;
DELETE FROM theme where theme_id=5;
>> Deploy Static Content for Selected Theme:
NOTE: Executing just the 4th command from the list below, will automatically run all the commands from 1 to 3.
- php bin/magento setup:static-content:deploy --theme Magento/backend en_US
- php bin/magento setup:static-content:deploy --theme frontend/Smartwave/porto en_US
- php bin/magento setup:static-content:deploy --theme Smartwave/porto_child en_US
- php bin/magento setup:static-content:deploy --theme Smartwave/porto_child
>> Sample Data:
- Deploy sample data modules: php bin/magento sampledata:deploy
- Remove all sample data packages from composer.json: php bin/magento sampledata:remove
- Reset all sample data modules for re-installation: php bin/magento sampledata:reset
>> Magento Mode:
- Display current mode: php bin/magento deploy:mode:show
- Change mode: magento deploy:mode:set {mode} [-s|--skip-compilation]
where
{mode} is required; it can be either developer or production
--skip-compilation is an optional parameter you can use to skip code compilation when you change to production mode.
Example: php bin/magento deploy:mode:set production -s or php bin/magento deploy:mode:set developer - Change to production mode: magento deploy:mode:set production
- Change to developer mode: If you’re changing from production mode to developer mode, delete the contents of the var/generation and var/di directories. Run the following command in your Magento Root Directory:
rm -rf var/di/* var/generation/* var/cache/* var/page_cache/* var/view_preprocessed/* var/composer_home/cache/*
php bin/magento deploy:mode:set developer
or
php bin/magento module:enable [--force] Magento_Developer
>> Cron Job Hang/Stuck/Stopped
If your cron job has got stuck or what is also known as hanged, you can run the commands below to resolve the issue. Sometimes, you might have to re-run all the 3 commands, in case the issue doesn't resolve in the 1st attempt:
- php bin/magento setup:cron:run
- php bin/magento cron:run
- php update/cron.php
Saturday, November 5, 2016
[SOLVED] - Problem after Updating NVIDIA Drivers in Dell 5558 Laptop using Ubuntu 14.04
Today I was recommended to update my NVIDIA drivers to its latest version nvidia-graphics-drivers-367 package. Once I updated and rebooted my Dell 5558 laptop, using Ubuntu 14.04 I experienced a blank login screen. After some Google searching I found out that probably the Unity Service had failed to load because of driver incompatibility issue.
So the solution I figured out was to switch to terminal from the blank login screen; where I was unable to see nothing. Press CTRL+ALT+F2 to switch to Terminal. Then log into your account and hit the following command to remove the NVIDIA drivers completely from your system:
You should be getting a message as displayed in the image below:
Confirm by pressing 'y or Y' to delete.
Once deleted restart your computer and install the compatible driver version.
In my case I had TimeShift installed which is a software that allows feature just like Windows Restore through which I restored my computer to the state just before it was updated.
So the solution I figured out was to switch to terminal from the blank login screen; where I was unable to see nothing. Press CTRL+ALT+F2 to switch to Terminal. Then log into your account and hit the following command to remove the NVIDIA drivers completely from your system:
sudo apt-get remove --purge nvidia-*
You should be getting a message as displayed in the image below:
Confirm by pressing 'y or Y' to delete.
Once deleted restart your computer and install the compatible driver version.
In my case I had TimeShift installed which is a software that allows feature just like Windows Restore through which I restored my computer to the state just before it was updated.
Wednesday, September 28, 2016
Updating PHP 5.5.x with PHP 5.6 or PHP 7.0 in Ubuntu 13.04, 14.04, 15.04
After trying a couple of packages, settings and configuration, finally I seem to have found out a working solution:
Please note the repository is as stated above and not as:
ppa:ondrej/php5-5.6 because this has been deprecated where the above PPA is a co-installable one, meaning you can install PHP 5.5, PHP 5.6 or PHP 7.0 as per your requirement.
Press enter to confirm. If you come across any error then you will need to install python-software-properties first as shown below:
1. Update your PPA repository with the PHP 5.6 package sources:
sudo add-apt-repository ppa:ondrej/php
Please note the repository is as stated above and not as:
ppa:ondrej/php5-5.6 because this has been deprecated where the above PPA is a co-installable one, meaning you can install PHP 5.5, PHP 5.6 or PHP 7.0 as per your requirement.
Press enter to confirm. If you come across any error then you will need to install python-software-properties first as shown below:
sudo apt-get update
sudo apt-get install python-software-properties
2. Update
Once again update your packages: sudo apt-get update
3. Install PHP 5.6 and its relevant mods:
sudo apt-get install php5.6 php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
sudo apt-get install php7.0 # for PHP 7.0
sudo apt-get install php5.5 # for PHP 5.5
4. Disable PHP 5.5:
Now this step is very important else you won't be able to use PHP 5.6. Even when you check your PHP version, it will still display as PHP 5.5. Follow the step below to disable PHP 5.5. sudo a2dismod php5
5. Enable PHP 5.6:
sudo a2enmod php5.6
6. Restart Apache web server:
sudo service apache2 restart
Note: New location of php.ini file in PHP 5.6:
The location of php.ini fie is changed in PHP 5.6 unlike PHP 5.5 where it used to be located at '/etc/php5/apache2/php.ini'; the new location is at '/etc/php/5.6/apache2'
Subscribe to:
Posts (Atom)
Top 5 Posts (Weekly)
-
Since yesterday, I've been trying to backup my hard drive using Clonezilla but without any success. Twice I got the following error, wh...
-
If you are a Linux user with a premium MEGA account, you might have noticed there is no official, standalone desktop app for MEGA VPN on ...
-
If you are unable to suspend your laptop, here's the solution which I've tried & tested and it worked with my Lenovo Thinkpad T4...
-
When Not to Use Obsidian: Why You May Not Need a Second Brain Obsidian is one of the most powerful note-taking and knowledge-management appl...
-
>> Download Links: SP Flash Tool (Linux/Windows) : http://bit.ly/2CZkTER SN Write Tool (Windows only) : http://bit.ly/2Aw22Ov ...
