I can think of a few things that are wrong with that title but in all seriousness…don’t you ever wonder where cPanel stores the config changes that you make in WHM? Automation is the key nowadays, and lately that’s required me to get a little down and dirty with cPanel to find its deepest secrets. *This information is not official documentation, nor is it backed up by cPanel or set in stone. In other words, don’t blame me if you mess up your server.
These are files that store the information read and used by WHM (as of 11.23.6)
IP addresses: /etc/ips
These are a few scripts that you can use to achieve the same results of their WHM equivalents:
- Initialize quotes: /scripts/initquotas
- Compile Apache: /scripts/easyapache (you can pass additional options – see EasyApache 2 docs)
- Update cPanel: /scripts/upcp
- Enable/disable tweak settings: /scripts/smtpmailgidonly on|off
- Change PHP API and suExec settings: /usr/local/cpanel/bin/rebuild_phpconf
- Suspend an account: /scripts/suspendacct <user> <reason>
- Terminate an account: /scripts/killacct <user>
Obviously there are a ton more, and just about anything done in WHM can be done directly on the server. The main things to remember:
Scripts are mainly stored in /scripts and /usr/local/cpanel/bin
Data files are in /var/cpanel
Config files are in /etc/ and /usr/local/cpanel