Drupal Dump

Drupal Snippets, Hacks and more....

495 posts since 2011

DB Uploading from local to remote

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

Custom form, custom template or preprocess function

Having custom template or function to preprocess your custom form in module has few tricks.

First you need to define it in form

$form = array();
$form['#theme'] = 'my_form_theming_function';
....

then define hook_theme