How to reduce a size of image files

ImageMagick is required

sudo apt-get install imagemagick -y

Reduce image size by 25%

convert image.jpg -resize 25% output.jpg

It will decrese image file size from ~6.1M to ~300K. So pretty fine for website loading

For mass converting run this from the inside folder which contains *.jpg… Read the rest

How to enable viewing HTML content in Horde?

The post is outdated, please read this one https://alltime.pp.ua/blog/how-to-enable-inline-html-display-in-horde/

Edit the following file

vi /usr/local/cpanel/base/horde/imp/config/mime_drivers.php

Replace the line :45 from:

 $mime_drivers['imp']['plain']['inline'] = false;

to

 $mime_drivers['imp']['plain']['inline'] = true;

Done!

 

 

 … Read the rest

How to run a shell command as another user without Shell Access enabling

It needs if you don't want to waste time to enable Shell Access for specific user to run some command from his shell

sudo -H -u someuser bash -c 'uptime'

Example of using:

cd ~someuser/www
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
Read the rest

How to install WP-CLI

WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, set up multisite installs and much more, without using a web browser

cd
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod 755 wp-cli.phar
mv wp-cli.phar wp
mkdir wp_cli
mv wp wp_cli
echo "alias wp='~/wp_cli/wp'" >> ~/.bashrc
Read the rest

How to install Drush

Drush is an awesome shell interface for managing Drupal right from your server command line. It is a very useful tool as it helps you perform various admin tasks using just one or two commands in the terminal

Find your appropriated Drush version for your Drupal

http://docs.drush.org/en/master/install/Read the rest