If you want to dump DB from production or develop servers and not include cache table values for faster importing you can use below script. You need to change site_name variable and DUMPDIR to match what you have and also user/password of DB
If you want to dump DB from production or develop servers and not include cache table values for faster importing you can use below script. You need to change site_name variable and DUMPDIR to match what you have and also user/password of DB
If you need to copy DB, lets say from production to develop you can use this script and call it like "develclone.sh original_db cloned_db"
For faster cloning it will exclude cache tables data.
To delete stale CSS and JS files from server, you need to add
variable_set('drupal_stale_file_threshold', 86400);
to your settings.php and change the value from default 30 days (2592000) to for example 1 day above.
They will be deleted on cron run.
I have been getting ERROR: Site [such] does not exist! when running
sudo a2dissite "some virtual host"
You probably updated your server
installation and one of the updates included the upgrade of Apache
to version 2.4.x
zcat /Users/Marko/Downloads/file.sql.gz | mysql -u 'root' -p'password' your_database
just drop this line in your linux or mac and fill data you need to fill and wait :) or this for gz files
gunzip < /Users/Marko/Downloads/mydb.sql.gz | mysql -u root -p mydb
or for ZIP files
When I want to find something in GIT and see who and when removed some code I start to search GIT, best command combo is this.
git log -S "$location['country_code']" -p
For current branch
In mysql 5.6+. Use this:
[mysqld]
general_log = on
general_log_file=/usr/log/general.log
in your my.cnf / my.ini file
We had on server this thing set
http-response set-header X-Frame-Options DENY
mysqldump -u user -p databasename > dump.sql
Then using SCP transfer the file to the remote server:
scp dump.sql user@remotehost.ip:
Then use the mysql client there to import the dump.sql with:
mysql -u user_name -p databasename < dump.sql
Using drush on mac with mamp gave me some problems with default setup. I didnt set
DRUSH_PHP variable anywhere so default php was used, also with that no php.ini setting was set and in my drush status I got empty "Drush configuration" variable. So to set this up, I needed to add this to either .profile or to .bash_profile (depends of load order, later goes first if you have it)