Deploying big release branches, steps to take (dry run merge and checkup)

If you have big sprint with big amount of task and put all of that into feature branch that you need to deploy (merge to master) then it is good to have one big final checkup before doing that. So what I do is this, go to your master branch and either make one temp branch from it like "master_temp" or do it directly there. For extra caution I use temp branch.

Fetch your mysql configuration

You want to check some environment variables values for your current setup. Log into mysql and type something like

Testing drupal site as authenticated user

In order to generate authenticated requests using curl we can use the session cookie from a session in our browser. How to find that? Sign in to your site in your browser. Then find the cookie that starts with either SESS, or SSESS followed by a random string.

Adding additional ssh-keys to your .ssh

Usually people will just create one key with just default command 

ssh-keygen 

get a public/private pair in (/Users/my_user/.ssh/id_rsa) and use that for anything, but there is much more to this then that. You can create many keys and use them for separate accounts and also automate that.

For example

LEMP, NGINX stack - Only home page works fine, all others give 404 error

If you have a problem where you have LEMP Stack (Nginx instead of apache) and you get 404 on all pages but front you probably need to change one line in your "/sites-enabled/your-iste" file. So lets open this nginx file that defines virtual block and change the part under "location" directive from
 

Installing composer on dedicated server

If you are having problems with installing composer on your dedicated server try it like this

sudo curl -s https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

also check if you have openssl enabled as extension in your php.ini (this depends on php version)

Drush download drupal 7 into the current directory

For drupal 8 you will probably use more complex framework with composer at leas but for drupal 7 you still might use drush just to download drupal core. So to do that into the current directory you are at, use this command

drush dl drupal-7.x --drupal-project-rename="../${PWD##*/}" -y

It will overrun everything you have in that directory.