php bin/magento admin:user:create --admin-firstname=Russell --admin-lastname=Albin --firstname.lastname@example.org --admin-user=ausernamegoeshere --admin-password=somepassword
Posted: April 25, 2017|Categories: Command Line|
If you are searching for files that have been recently updated you can use the find command
This example will get all files that were changed within the past 3 days
find . -ctime -3
Originall from http://webcheatsheet.com/sql/mysql_backup_restore.php but condensed here to just the things I always have to look up
Some useful commands when doing mysql command line
$ mysqldump --opt -u [uname] -p[pass] [dbname] > [backupfile.sql]
For example, to backup a database named 'Tutorials' with the username 'root' and with no password to a file tut_backup.sql, you should accomplish this command:
$ mysqldump -u root -p Tutorials > tut_backup.sql
SSH into Amazon using PEM
Move files from local to Amazon
rsync-rave "ssh -i some.pem"/path/to/local/files/* ec2-user@EC2_INSTANCE_HOSTNAME:/path/to/remote/file
I found an interesting difference in Magento 2 as compared to Magento 1 with ACL.
We no longer need to define our own private function _isAllowed(). They now have a const that we can use, and let the abstract class take care of defining the _isAllowed.
To reference here is some sample code:
Recently I needed to update a Magento 2 store to start Order numbers and Invoice numbers to specific numbers. Its pretty easy, you just need access to the database and run these commands:
When reviewing the /var/log/maillog in my Centos server, I noticed that gmail was not happy with my settings and rejecting emails.Our system has detected that 550-5.7.1 this message does not meet IPv6 sending guidelines regarding PTR 550-5.7.1 records and authentication. Please review 550-5.7.1 https://support.google.com/mail/?p=IPv6AuthError for more information
Here is a sample of the maillog
I am assuming a few things for this post.
- You have Phpstorm
- You are using Vagrant for a virutal machine
- You understand how to ssh
- You understand simple command line
- You have a need to debug PHP
I will hopefully get a post for how to setup xdebug on a Linux server, but for now, I have to assume you got xdeubg setup properly on your Linux device.
For a nudge in the right direction for setting up xdebug, please refer to the main website. It is very good! https://xdebug.org/docs/install
Verify xdebug is on your vagrant server ( linux box ). Log into your vagrant virtual machine using ssh and run the command:
# php -v
There is a common mis-conception that the Magento Admin functionality labled "Disable Modules Output" will disable a module. This actually only prevents what the module is supposed to push to the browser from occuring and instead pushes an empty string.
For example, here in Magento 1.x is some code from the Core that may help
Turning on Magento Enable Flat Catalog will certainly help the users experience on the Frontend. This feature will only show marginal improvements if your categories are very limited and your products are limited. The better performance is gained when there are dozens of categories and several hundred products. For smaller sites you may actually see a perforance decrease.
So, if you have enough categories and / or enough products here is how to turn on these options.
Magento 1.x Click on System - > Configuration