WordPress update all post with WP-CLI
In wordpress folder, run commands: Above commands mean “do nothing”. But you can edit to do something.
Run WP CRON with crontab and WP CLI
Download wp-cli: Add crontab in /var/spool/cron/root: Make sure your crontab file is good linux format: Disable WP_CRON in wp-config.php: By Proxy, block or return empty page for requests to your http://domain.com/wp-cron.php
Tuning performance Mariadb/ MySQL
Add more config (maybe at /etc/my.cnf.d/server.conf): With a powerful server, can adjust I/O: How to find the good innodb_buffer_pool_size number? Here is Recommended InnoDB Buffer Pool Size: Or adjust more 10%: After your DB run with new config in a period time (daily, weekly,…), check how many memory in used. This Data_MB number can be…
Run PHP-FPM (FastCGI) with NGINX
Install PHP-FPM (FastCGI) and NGINX Selinux Create new website: New user and project Create new php-fpm pool New file: /etc/php-fpm.d/domain.com.conf: Restart Create Nginx config: Restart Install SSL Install certbot: Create cert Then update cert to nginx config with new server block for port 443 ssl with fastcgi_param HTTPS on; and declare cert & key. Some…
Install ClamAV antivirus or Linux Malware Detect
Install ClamAV Install Linux Malware Detect ClamAV should be install first, helpful for Linux Malware Detect. Install Linux Malware Detect: Scan: Show quarantine files:
Count the usage size of Mariadb/MySQL
Query: Result:
Config HAProxy community edition Active/Active cluster (Solution)
The first, install keepalived to manage Virtual IP. My concept is use 2 Virtual IPs bind on 2 Nodes. Node 1 is MASTER on Virtual IP 1 and BACKUP on Virtual IP 2, Node 2 is MASTER on Virtual IP 2 and BACKUP on Virtual IP 1. DNS Round-robin to 2 Public IPs, every Public…