Note: Try it on your own risk or get an expert to do it.
Enable Exec() WordPress:
My Server and wordpress: I own a VPS self managed with WHM and root access. I run PHP 7.3 with PHP-FPM.
What to do?
To enable exec() wordpress
You need to edit /opt/cpanel/ea-php70/root/etc/php-fpm.d/username.domain.conf (be sure to replace username.tld with the appropriate username).
This can be done in two ways. Techie & Non techie way.
Edit nano /opt/cpanel/ea-php70/root/etc/php-fpm.d/username.domain.conf vai SSH.
(be sure to replace username.tld with the appropriate username).
This assumes we are enabling these functions for PHP version 7.0. Simply change according to which PHP version you’d like by replacing ea-php70.
Simply remove exec and shell_exec from the following line: php_admin_value[disable_functions]
This will solve the issue and enable exec().
Note: Be safe with the software you are going to install and use it at your own risk.
To enable exec() wordpress install ConfigServer Explorer (CSE) in WHM.
Login to WHM and open terminal. This is available under WHM–>Server Configuration.
Execute these commands to install ConfigServer Explorer. cd /usr/src rm -fv /usr/src/cse.tgz wget https://download.configserver.com/cse.tgz tar -xzf cse.tgz cd cse sh install.sh rm -Rfv /usr/src/cse*
Post installation scroll down to bottom left hand menu in WHM. You will find CSE Installed.
Note: Be very careful. If you edit or delete or modify any other files, then your entire server might crash.
Click open CSE and carefully navigate to /opt/cpanel/ea-php70/root/etc/php-fpm.d/ as said before open the correct PHP version your using.
In PHP-FPM.D folder you will find an .conf file with your domain name, open it.
Carefully score down to PHP_ADMIN_VALUE(Disable_functions) and remove exec and shell_exec and save it.
Kind advice: once you have done this, please move away from CSE. Do not try to explore too much. Trust me a same mistake will cost you a lot.
Once you save it exec will be enabled.
For more details about CSE check this https://www.configserver.com/cp/cse.html
Hope this helps you.