How to install Drupal Console

If you don't have Drush and Composer installed yet, please do it firstly click here

mkdir drupalconsole
cd drupalconsole
curl -L -o drupal.phar
chmod +x drupal.phar
echo "alias drupal='~/drupalconsole/drupal.phar'" >> ~/.bashrc
source .bashrc

Navigate into your site root where you have Drupal installed

cd /home/$USER/public_html
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader --sort-packages

Check how its working:

drupal site:status
drupal about

Useful URLs: the rest

How to create port listener on Linux

Install nc if needed

yum install nc

Run listener on port 3000

nc -l 3000 &
nc -l -k 3000 &

where -k is –keep-open will keep connection opened and allows multiple connections in listen mode

Check on the server’s side:

netstat -tunap |grep :3000


tcp        0      0      *                   LISTEN      82786/nc            

Check from local machine:

$ nmap -p 3000 SERVERS_IP_ADDRESS


Starting Nmap 7.01 (
Read the rest

How to change a website’s IP address via command line

Just run

/usr/local/cpanel/bin/setsiteip -u $user $ip

or using whmapi1

whmapi1 setsiteip ip= user=$user

to add IP onto the server

whmapi1 addips ips= netmask=

to remove IP

whmapi1 delip ip=

to check IP usage

whmapi1 get_shared_ip user=$user

to check server’s IP addresses

whmapi1 listips
Read the rest

WordPress how to disable default wp-cron.php behavior

By default WordPress runs its wp-cron.php too frequiently, so to change it:

Update wp-config.php with the following line:

define('DISABLE_WP_CRON', true);

Setup manual cron job for wp-cron.php

Enter user’s crontab

crontab -lu USERNAME

And append command to run cron every 12 hours

0 */12 * * * cd /home/USERNAME/public_html; php -q wp-cron.php
Read the rest

How to fix RoundCube’s error: DATABASE ERROR: CONNECTION FAILED!

Mysql server and InnoDB engine must to be running!

Check mysql connection:

cat /usr/local/cpanel/base/3rdparty/roundcube/config/ |grep mysql:
$config['db_dsnw'] = 'mysql://roundcube:lasMubMX08D3HKtr@unix(/var/lib/mysql/mysql.sock)/roundcube';
mysql -u roundcube -p
show tables;

All tables should be in place:

| Tables_in_roundcube |
| cache               |
| cache_index         |
| cache_messages      |
| cache_shared        |
| cache_thread        |
| contactgroupmembers |
| contactgroups       |
| contacts            |
| cp_schema_version   |
| dictionary          |
| identities          |
| searches            |
| session             |
| system              |
| users               |
15 rows in set (0.00 sec)

Cpanel keeps roundcube backups here:


Go ahead and drop broken database

mysqladmin drop roundcube

Rebuild roundcube using the following two commands:

rpm -e --nodeps cpanel-roundcubemail

/usr/local/cpanel/scripts/check_cpanel_rpms --fix

Database roundcube should be recreated automatically.
Read the rest

FormMail script

Follow the links below:

You need to upload the formmail script to cgi-bin/ folder and set permissions for to 755. Then change one line in the .pl script:

from: @referers = ('','YOUR_IP'); to: @referers = ('','');

You will need to add the following lines to your contact form:

<input type=hidden name="recipient" value="[email protected]">
Read the rest

How to enable Inline HTML display in Horde

cPanel’s Horde has “Inline HTML” is disabled by default

The error you probably got:

This message part contains HTML data, but inline HTML display is disabled.
View HTML data in new window.
Convert HTML data to plain text and view in new window.
Read the rest