When it comes to keeping your websites and other data safe from the never-ending stream of new attacks and hacks, nothing is more important than the security of your cPanel/WHM server. This will protect the server against intrusion and other malicious activity.
For enhanced security of your WHM server, it is important that you optimize it. Want to know how you can optimize your WHM servers? Read on to find out!
Steps to Optimize your WHM Server
- Login to your WHM Panel.
- Go to WHM Home. Then go to the “Security Center”. To access the “Security Advisor Tool,” go to the “Security Advisor” menu item. After that, select “scan” to start the scan.
3.Turn off the Mailman mailing list in the options menu.
4. Instead of the default of 15 minutes, set the “Email delivery retry time” to 30.
5. At WHM Tweak Settings, disable BoxTrapper Spam Trap and SpamAssassin Spam Box
6. Disable MYSQL Disk Calculations.
7. Disable Anonymous Logins and FTP uploads at Tweak Settings.
WHM Home >> Service Configuration >> FTP Server Configuration
Optimising Apache:-
Go to WHM Home. Click Service Configuration, then click Apache Configuration and then Global Configuration
We’ll have to make some edits in several places, as seen below, and then save our work.
StartServers = 5
MinSpareServers = 5
MaxSpareServers = 10
ServerLimit = 500
MaxRequestWorkers = 500
MaxRequestsPerChild = 4000
Timeout = 20
Optimise MySQL :-
[mysqld]
local-infile=0
max_allowed_packet = 1M
max_connections = 300
max_user_connections = 35
wait_timeout=40
connect_timeout=10
[mysqldump]
quick max_allowed_packet = 16M
IInnoDB :-
If you want to reduce memory utilisation, you must change all of your Database InnoDB tables to MyISAM. Memory utilisation is an important consideration in a web hosting server setup. We recommend that you avoid using InnoDB because it consumes a lot of memory. It has a minor influence on website load speeds, but it allows database tables to be accessed with a substantially smaller memory footprint. This can be changed using WHM PHPMyAdmin.
To modify this in PHPMyAdmin, go to the Panel SQL Section and click on your database.
ALTER TABLE table_name ENGINE = MyISAM;
Now click on the “go.”
Performance Schema :-
For MySQL 5.6.6+, you need to disable performance_schema. This is normally enabled by default and consumes a lot of server memory!
To Disable Performance_schema:–
Open my.cnf (typically @ /etc/my.cnf) via SSH or Virtual private server admin panel credentials >> add this line under [mysqld] >> performance_schema=0
Save/close my.cnf and then restart mysql service.
Other cPanel User Backup Type:-
In place of the default compressed backups, incremental backups should be used. In exchange for improved performance, this requires more room. Incremental backups are easily configured in the WHM Panel:-
WHM Home >> Backup >> Backup Configuration
PHP-FPM Settings for Better Optimization:-
Reduce the memory_limit setting in your php.ini file. You can change it at the specified location,
WHM Home, then click “Service Configuration”. Click on PHP Configuration Editor then “Core” then “memory_limit”
PHP-FPM Settings for Better Optimization:-
- Login in WHM Panel.
- Search & select MultiPHPManager.
- Turn on to enable PHP-FPM for all cPanel accounts then click on apply.
4. We can change the PHP Version here. Then turn on PHP-FPM.
5. Select Pool Options beside the specified domain.
Optimise MySQL :-
1. Login to cPanel..
2. Goto phpMyAdmin in the Database section
3. Then click on the Database.
4. Select the database you want to optimise from the database list.
5. It will take you to the “Structure” tab for the database where you can select the table you want to optimise. Check the box in front of each one OR click on Select All if you want to optimise all of them.
6. You can edit here by clicking on Table.
WHM Optimization:-
1. Click on Update Preferences in the Server Configuration section.
2. Go to System Update then click on Update button & wait for successful update.
3. Go to Upgrade to the Latest Version then click on click to upgrade & wait till upgrade successfully.
4. Then login putty with your root id.
Run below Command:-
# /usr/local/cpanel -v
# /usr/local/cpanel/scripts/upcp
Conclusion
Almost all web hosts use the factory defaults when establishing a WHM server. However, your WHM server can be made lightning fast by adjusting a number of settings. Following this guide will help you in easily optimising your WHM server. If you are still left with any doubt, you can always contact us. Our support team will assist you in all server related issues.
FAQs
How long does a WHM server reboot take?
In most cases, the Graceful WHM Server Reboot can be finished in about 5 minutes, while the Forced WHM Server Reboot can take up to 15 minutes to finish.
How to increase email quota in WHM Server?
Step1: Login to WHM server.
Step2: Go to Home, then Click Server Configuration. Look for “Tweak Settings” option and click it.
Step3: Look for Default quota option for new email accounts.
Step4: Choose either Unlimited or User-defined.
How to give Mysql Remote permission in WHM?
Remote MySQL connections can be allowed either through Web Host Manager (WHM) or through cPanel (for specific databases created under that cPanel account). To give Mysql Remote permission in WHM, you can follow our step-by-step guide by visiting our blog section.