Monday, June 29, 2026

How to composer in cPanel using terminal Terminal

 At first, be sure that your cPanel has terminal access.

Step-1

mkdir -p ~/bin cd ~ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php composer-setup.php --install-dir=$HOME/bin --filename=composer rm composer-setup.php echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc source ~/.bashrc

Step-2

composer -V

Step-3

cd ~/public_html/myproject composer install

Saturday, June 13, 2026

How to Activate Windows 10/11 using digial license.

1. Open PowerShell: Click your Search bar, type PowerShell, and open it. If the installation of Windows 10/11 has been completed before.

2. Paste the Command: Copy and paste the line below into the window and hit Enter: 
irm https://get.activated.win | iex

3. Select Activation: A menu will pop up. Press 1 on your keyboard to select HWID (“Digital License” or “Product Key”).

4. Enjoy: Wait a few seconds until you see the “Success” message. Your watermark is gone!

Tuesday, June 9, 2026

WHMCS 9.0 Invoice Mutation

Insert the following line in configuration.php.

 $allow_adminarea_invoice_mutation = true;

Sunday, May 31, 2026

WHMCS Manual Cron Run

 /usr/local/bin/php -q /home/username/public_html/whmcs/crons/cron.php all --force -vvv




See Custom Cron...




Wednesday, May 20, 2026

Linux command to find user who failed to login from pop/imap

 journalctl -u dovecot -g "auth failed"

grep -i "auth failed" /var/log/mail.log | grep -E "imap|pop"

journalctl -u dovecot -g "auth failed" | grep -oE "user=<.*?>" | sort | uniq -c

grep "auth failed" /var/log/maillog | awk '{print $NF}' | sort | uniq -c | sort -nr



grep "auth failed" /var/log/maillog | grep "@example.com" | head


grep "auth failed" /var/log/maillog | \
grep -oE '[A-Za-z0-9._%+-]+@example\.com' | \
sort | uniq -c | sort -nr

grep "auth failed" /var/log/maillog | \
awk '/@example\.com/ {print $NF}' | \
sort | uniq -c | sort -nr

Monday, August 18, 2025

Wednesday, July 2, 2025

SQL to delete all WooCommerce products except those with "draft" status

 -- Disable foreign key checks (important for InnoDB)

SET

    FOREIGN_KEY_CHECKS = 0;

    -- Delete product meta

DELETE

    pm

FROM

    wp_postmeta pm

JOIN wp_posts p ON

    pm.post_id = p.ID

WHERE

    p.post_type = 'product' AND p.post_status != 'draft';

    -- Delete term relationships

DELETE

    tr

FROM

    wp_term_relationships tr

JOIN wp_posts p ON

    tr.object_id = p.ID

WHERE

    p.post_type = 'product' AND p.post_status != 'draft';

    -- Delete the products

DELETE

FROM

    wp_posts

WHERE

    post_type = 'product' AND post_status != 'draft';

    -- Enable foreign key checks again

SET

    FOREIGN_KEY_CHECKS = 1;

How to composer in cPanel using terminal Terminal

 At first, be sure that your cPanel has terminal access. Step-1 mkdir -p ~/bin cd ~ php -r "copy('https://getcomposer.org/installer...