For issues related to disk usage, you can use these commands:
To check tmp:df -h /tmp
To delete or empty /tmp, run:rm -rf tmp/*
If the folder size didn’t change after deleting /tmp, check php-fpm logs:rssh >> cd /usr/local/php81/var/log >> truncate -s 10MB php-fpm.logTo check inodes:
df -hi /homeordf -i
To check disk usage:df -h /home
Change Ownership of a folder/file:
rssh to the server then cd /home/userchown -R ftpuser:group foldernameChange permission:
chmod -R 644 wp-config.php
How to get storage, folder breakdown:du -h --max-depth=1Search-replace:
wp search-replace 'http://example.test' 'http://example.com' --dry-runwp profile hook:
wp profile hook --all --spotlight --orderby=time --fields=callback,location,time,request_time --order=DESCwp profile stage:
wp profile stage --fields=stage,time,cache_ratio
wp cron event:wp cron event listwp cron event run --due-now
DB optimization:wp transient delete --all --skip-plugins --skip-themes && PREFIX=$(wp config get table_prefix) && wp db query "OPTIMIZE TABLE ${PREFIX}options;"
To check db size:wp db size --tables --size_format=mb --all-tables-with-prefix
How to put all files in one sql file:cat *.sql > backup.sql
Installing one time login:wp plugin install one-time-login --activate --quiet --skip-plugins --skip-themes && wp user one-time-login $(wp user list --role=administrator --field=id --skip-plugins --skip-themes | head -n1) && sleep 30; wp plugin delete one-time-login --skip-plugins --skip-themes
Kill PHP Process:killall -9 php82.cgi -u sftpusername