To edit hosts file:
sudo nano /etc/hosts
To edit hosts file:
sudo nano /etc/hosts
To retrieve an IP address via shell:
nslookup example.com
To retrieve an IP address via shell:
nslookup example.com
entity_browser
: Doesn't do much without configuration. media_entity_browser
is basically a configured version of this for browsing images, videos, etc. Might be better to do manually as it can integrate with inline_entity_form
contact_storage
: Aims to bring Drupal's core contact form module towards D7's webform
and entityform
modulesrestui
: Useful when using the REST API to exposed endpoints, but can be done in views
instead.webform
: Look to replace with core's contact_form
when it has features like multi-page support, email / handlers (user selectable, ideal for CRM), etc.inline_entity_form
: For creating and editing entities on the same page.To show what services are running on what ports:
netstat -tulpn
To test PHP's mail function sends mail via the command line:
php -r 'mail("[email protected]","Subject","Body");'
Tip: Use an email spam tester to debug (such as http://www.isnotspam.com)
Create user:
drush ucrt example_username --password="example_password" --mail="[email protected]"
Update user password:
drush upwd example_username --password="example_password"
Locate and edit my.cnf
files on the system, commonly located at /etc/mysql/my.cnf
on Ubuntu.
Comment out (using #
) any lines that begin with log-bin
and expire_logs_days
in the my.cnf
file and save to disable the binary logs.
Restart the MySQL/MariaDB or equivelent service. For example:
sudo service mariadb restart
Previously created binary logs will not yet be removed. To remove any previously created binary logs, see here
Login to MySQL (requires a root
account or equivilant):
mysql -u <username> -p
To purge binary logs before the last 3 days:
PURGE BINARY LOGS BEFORE NOW() - INTERVAL 3 DAY;
Export a database dump via command line:
mysqldump -u <username> -p <databasename> > <filename.sql>
Import database dump via command line:
mysql -u <username> -p <databasename> < <filename.sql>