Monitor Apache using monit

Monit is a small Open Source utility for managing and monitoring Unix systems. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations. Installing monit on CentOS 7 yum install epel-release -y yum install monit -y Once installed, save the following in /etc/monit.d/apache check process httpd with pidfile /var/run/httpd/ group

Fix WordPress Files & Folders Permission Massively On cPanel Server

chdir(“/var/cpanel/users”); $users = glob(‘*’); foreach($users as $user) { if(is_file(“/home/$user/public_html/wp-config.php”)) { echo “Performing on /home/$user/public_html\n”; system(“find /home/$user/public_html/ -type d -exec chmod 755 {} \; “); system(“find /home/$user/public_html/ -type f -exec chmod 644 {} \; “); } } Save the file as fix.php on /root Then execute it /usr/local/cpanel/3rdparty/bin/php /root/fix.php