Install Linux Centos 7, Nginx, MySQL, Postgres, PHP 8.0

Update LANG Edit environtment vi /etc/environment add these lines… LANG=en_US.utf-8 LC_ALL=en_US.utf-8 Update and upgrade Core yum -y update yum -y upgrade Install NGINX yum install epel-release yum install nginx Start NGINX and Enable Service systemctl start nginx systemctl enable nginx Install PHP 8.0 Enable Remi Repo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm Check yum –disablerepo=”*” –enablerepo=”remi-safe” list php[7-9][0-9].x86_64…

Display the default discounted price and percentage on Woocommerce products

woocommerce version 3 as Product object properties ca’t be accessed directly. Instead you should use available WC_Product methods. To format the prices you will use wc_price() dedicated formatting function. Now you can have (3 possibilities): 1) The saving price: add_filter( ‘woocommerce_get_price_html’, ‘change_displayed_sale_price_html’, 10, 2 ); function change_displayed_sale_price_html( $price, $product ) { // Only on sale…

How to disable or customize cPanel’s Update Preferences from the Command Line

The default update settings for a cPanel installation are usually controlled from the WHM interface: WHM > Server Configuration > Update Preferences However, there are situations where a greater level of control might be required. In such cases, it is usually easier to modify the update settings right from the command line. The file that…

How do convert a dedicated IP to a shared IP on cPanel/WHM

In root SSH, copy the /etc/domainips file and then remove the IP from it: Code: cp /etc/domainips /etc/domainips.bak110726 vi /etc/domainips You’ll see a line for the IP like the following that you’d remove from that file: Code: IP#: domain.com Where IP# is the dedicated IP and domain.com is the current domain using that IP. After…

How to configure the passive ports range for ProFTPd on a Plesk server behind a firewall

Question How to configure the passive ports range for ProFTPd on a server behind a firewall? Answer Note: When configuring the passive port range, a selected port range must be in the non-privileged range (e.g., greater than or equal to 1024). It is strongly recommended that the chosen range should be large enough to handle…

AutoSSL issue with cpnginx

cat /usr/local/nginx/conf/vhost.ssl.d/domainname.com.conf Add below lines before –  location = /favicon.ico { #………….. Cpnginx OCSP stapling protection for security start ……………….. ssl_stapling on; ssl_stapling_verify on; ssl_trusted_certificate /usr/local/nginx/conf/ssl.ca.d/gameoncricket.com_ca-bundle; resolver 127.0.0.1 8.8.8.8 4.2.2.1 8.8.4.4 4.2.2.2 valid=300s; resolver_timeout 5s; #………….. Cpnginx OCSP stapling protection for security end………………….. After above, nginxctl rebuildvhost  domainname.com check nginx status – systemctl status nginx.service…