We do support Round the Clock 24 x 7 x 365 (+91) 883 012 3924
header-image

L3 Web Hosting Blog

cPanel, Plesk, Wordpress Hosting SSD disk

Check out L3WebHosting blog for tips and in-depth articles on web hosting services !!

CPU usage exceeded in cPanel

There are several causes that lead to the overcoming of resources.
This issues will appear especially for the websites which are hosted in the shared web hosting server.

What may create High CPU usage problem :

  1. By running an older version of website application like wordpress

  2. Due to outdated plugins / themes

  3. By running a beta version of plugins / themes

  4. Due to old PHP version

  5. Less PHP memory limits

  6. By Running a resource consumption plugins / themes

There are several ways to decrease the CPU usage for your account :

1. Update version of website applications like wordpress, its plugins & themes.
2. Do not run the beta version plugins. Always run the stable version of plugins / themes.
3. Use the Higher version of PHP.
4. Do not run dynamic plugins which consume more CPU/memory resources.

If you have done all the above changes but still you face the same issue you will need to upgrade your hosting plan to higher plan which are having better CPU and memory resources.

We can take care of all if you use one of our Optimized CPanel Hosting serviceshttps://www.l3webhosting.com/managed-cpanel-server.php in which you can simply ask our Technical team to help you regarding any problem or configuration for your WHM/cPanel server.
They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using below buttons or simply leave a reply below.

Thank you very much L3WebHosting team !!

fix unlimited quota issue of cPanel account

Sometimes WHM >> List Account shows unlimited quota or 0.00 MB for all cPanel accounts.

We can fix this issue with below command :

# Login to SSH shell with root user

# Enter below command :

# /scripts/fixquotas

We can take care of all if you use one of our Optimized CPanel Hosting services https://www.l3webhosting.com/managed-cpanel-server.php in which you can simply ask our Technical team to help you regarding any problem or configuration for your WHM/cPanel server.
They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using below buttons or simply leave a reply below.

Thank you very much L3WebHosting team !!

Truncate exim database on cPanel server

Follow below steps to truncate all current eximstats tables :

# Login to SSH with root user
# Enter into MySQL server

# mysql

# Use the database eximstat.

mysql> use eximstats;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

Change time zone on Amazon Linux AMI [AWS]

First, we need to  configure AWS instance to use the Amazon Time Sync Service :

 

  1. Connect to your instance and uninstall the NTP service.
    [ec2-user ~]$ sudo yum erase 'ntp*'
  2. Install the chrony package.
    [ec2-user ~]$ sudo yum install chrony
  3. Open the /etc/chrony.conf file. Verify that the file includes the following line:
    server 169.254.169.123 prefer iburst
  4. Start the chrony daemon (chronyd).
    [ec2-user ~]$ sudo service chronyd start

    Note :
    On RHEL and CentOS (up to version 6), the service name is chrony instead of chronyd.

  5. Use the chkconfig command to configure chronyd to start at each system boot.
    [ec2-user ~]$ sudo chkconfig chronyd on

How to migrate CloudLinux settings to another server

To move LVE and packages limits :

# Copy /etc/container/ve.cfg file from old server to new server

# Run below command on new server :
# lvectl apply all

To move CageFS settings :

# copy /etc/cagefs/cagefs.mp file from old server to new server
# copy /etc/cagefs/conf.d folder from old server to new server
# Enter below command on new server :
# cagefsctl --force-update && cagefsctl--remount-all

To move PHP Selector settings :

# copy /etc/cl.selector folder from old server to new server
# Enter below command on new server :
cagefsctl --setup-cl-selector

 

 

Fix : HTTP Error 404 – Not Found errors in yum on Cloudlinux Server

 

If you get 404 Page Not found errors while installing or updating any applications with yum like as below

http://repo.cloudlinux.com/kernelcare/7.4/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
http://repo.cloudlinux.com/other/cl7.3/mysqlmeta/cl-mariadb-10.1/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

Please comment out the following line in /etc/yum.conf :

distroverpkg=cloudlinux-release

You can run this command to comment out that line automatically:

sed -r -i 's/^\s*(distroverpkg\s*=\s*cloudlinux-release)/#\1/g' /etc/yum.conf

How to Safely Change the Location of MySQL Data Directory on cPanel/WHM CloudLinux Servers

1. Make a full mysqldump file

# mysqldump --opt -uroot -proot_password > /tmp/mysqldump

2. Uncheck monitor in WHM > Service Manager for Mysql and save the area

3. Stop MySQL service

# /etc/init.d/mysql stop

4. Ensure that the following settings are present

check file /etc/systemd/system/mariadb.service.d/homedir.conf
[Service]
ProtectHome=false
ProtectSystem=off

5. Make the directory for MySQL in /home, move it and symlink it:

# mkdir /home/var_mysql
# mv /var/lib/mysql /home/var_mysql
# chown -R mysql:mysql /home/var_mysql/mysql
# ln -s /home/var_mysql/mysql /var/lib/mysql

6. Remount CageFS system-wide:

# cagefsctl --remount-all

7. Start MySQL:

# /etc/init.d/mysql start

Block unwanted countries using the CSF Firewall

Sometime you get many unwant hits from different countries.
You can block full IP range of those countries through CSF firewall.
It will save alot of CPU and Memory resources for your real visitors that really need it.

# Login to WHM with Root user

# Click on “ConfigServer Security & Firewall

# Click the “Firewall Configuration” button

# Locate “CC_DENY” option and enter two letter Country Codes which country you want to block for your server.

You will find two letter codes at https://www.l3webhosting.com/blog/2018/10/19/complete-list-of-country-and-dialing-codes/

# Save and restart CSF Firewall.