How to fix /var/log/maillog log file that stuck writing

If the /var/log/maillog file is stuck writing, restarting the rsyslog service may help in resolving the issue.

service rsyslog restart

However, it is important to understand the potential impact of restarting the rsyslog service, as it can affect the logging for other services running on the server.… Read the rest

How to increase the view limit of PureFTP on cPanel using whmapi1

The default cPanel limit is 10000

cat /etc/pure-ftpd.conf |grep LimitRecursion

LimitRecursion 10000 8

# ‘ls’ recursion limits. The first argument is the maximum number of
# files to be displayed. The second one is the max subdirectories depth

To increase the view limit of PureFTP on cPanel using whmapi1, you can follow these steps:

– Log in to your server via SSH using the root user.… Read the rest

How to fix when cPanel reflects wrong PHP version

If cPanel is reflecting the wrong PHP version in cPanel –> Server Information

Use the steps below to fix the issue.

rm -f /etc/apache2/conf.d/php.version
cat /etc/apache2/conf.d/php.version


After running these commands, you should restart the Apache web server to ensure that the changes take effect:


Note that depending on your cPanel installation and configuration, there may be additional steps required to ensure that the correct PHP version is being used by all services on the server.… Read the rest

SSL certificates used by the main services on a cPanel server



Here is a brief explanation of each path:

/var/cpanel/ssl/apache_tls/hostname/certificates: This is the directory where the SSL certificates for the Apache web server are stored. The hostname folder contains the certificate files for the specific hostname used for the cPanel account.

Read the rest

How to fix FileZilla Certificate Expired error

If you are experiencing a “Certificate Expired” error in FileZilla when attempting to connect to an FTP server on your cPanel server.

openssl s_client -connect -starttls ftp

Verification error: certificate has expired

Restarting the FTP server can sometimes resolve the issue.… Read the rest

How to add domain as parked/alias using cPanel API whmapi1 one line command?

You can add a domain as a parked/alias using the cPanel API whmapi1 in a single command line using the following syntax:

whmapi1 --output=json --user=USERNAME Park::addparkeddomain domain=DOMAINNAME

Replace USERNAME with your cPanel username and DOMAINNAME with the domain name you want to park/alias.… Read the rest

How to create database, database username and grant all rights on cPanel server via command line using UAPI

You can create a database, database user, and grant privileges using the cPanel User API (UAPI) command line interface.

Connect to your cPanel account using SSH.

Type the following command to create a new database:

uapi --user='cpanel_username' Mysql create_database name='database_name'

Replace ‘cpanel_username‘ with your cPanel account username and ‘database_name‘ with the name of the database you want to create.… Read the rest

How to know default webmail client that user uses for email box Horde or Roundcube on a cPanel server

To check the default webmail client that a user uses for their email box on a cPanel server, you can use the following command:

egrep "roundcube|horde" /home/*/.cpanel/nvdata/*_default_webmail_app

It will show a user, email box and default webmail app that set up by the user by default

 … Read the rest

How to change master domain for an account on cPanel server from command line

To change the master domain for an account on a cPanel server from the command line, you can use the cPanel API WHMAPI1. Here are the steps:

– Connect to the server via SSH using your preferred terminal emulator.
– Use the following command to change the master domain for the account:

whmapi1 modifyacct user=USERNAME
Read the rest