16
01
2024

Wp bulk user delete with sql

Kategorisi : Wordpress

DELETE
wp_users,
wp_usermeta
FROM
wp_users
INNER JOIN wp_usermeta ON wp_users.ID = wp_usermeta.user_id
WHERE
wp_users.ID IN (1,2,3);


15
08
2023

Find and Delete Users from WooCommerce

Kategorisi : Wordpress

DELETE FROM b_users
WHERE
b_users.ID NOT IN (SELECT
meta_value
FROM
b_postmeta

WHERE
    meta_key = '_customer_user')
AND b_users.ID NOT IN (SELECT DISTINCT
    (post_author)
FROM
    b_posts) LIMIT 100

;
DELETE FROM b_usermeta
WHERE
b_usermeta.user_id NOT IN (SELECT
ID
FROM
b_users);


29
11
2021

wp bulk price update with variables ( sql )

Kategorisi : Uncategorized
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_regular_price' AND meta_value != '';
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_sale_price' AND meta_value != '';
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_price' AND meta_value != '';
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_regular_price_tmp' AND meta_value != '';
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_sale_price_tmp' AND meta_value != '';
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_price_tmp' AND meta_value != '';
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_min_variation_price' AND meta_value != '';
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_max_variation_price' AND meta_value != '';
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_min_variation_regular_price' AND meta_value != '';
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_max_variation_regular_price' AND meta_value != '';
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_min_variation_sale_price' AND meta_value != '';
UPDATE wp_postmeta SET meta_value = meta_value*1.8 WHERE meta_key = '_max_variation_sale_price' AND meta_value != '';
DELETE FROM wp_options WHERE (option_name LIKE '_transient_wc_var_pricwp_%' OR option_name LIKE '_transient_timeout_wc_var_pricwp_%');

25
11
2021

linux http to https recursive text replace

Kategorisi : Uncategorized

find /var/www/*/ -type f -exec sed -i ‘s#http://#https://#g’ {} +


20
11
2021

wget ile gdrive üzerinden dosya indirme

Kategorisi : Uncategorized
wget --no-check-certificate 
'https://docs.google.com/uc?export=download&id=FILEID' -r -A 'uc*' -e robots=off -nd

03
11
2021

Autostart programs in Lubuntu

Kategorisi : Uncategorized

Open the file manager (by default PCManFM), go to /usr/share/applications. Right-click on the program you want to be added to your autostart programs, and click Copy. Now, go to ~/.config/autostart in PCManFM, right-click and click Paste. The program should be added to your autostart programs now, but double-check by clicking the LXMenu down left, click Settings, and then Desktop Session Settings.


05
02
2020

Sunucuya nas yedekleme sürücüsü eklemek

Kategorisi : Centos,Linux

mkdir /mnt/nassurucu
yum install cifs-utils
mount -t cifs //nassunucuadresi/kullaniciadi -o username=kullaniciadi,password=xxxxxx- /mnt/nassurucu/


05
02
2020

Plesk günlük veritabanı yedekleme cron

Kategorisi : Mysql,Plesk

2 ayrı veritabanının yedeğini tek seferde almak için cron komutu &&

/usr/sbin/plesk db dump db1 > /mnt/nasdrive/$(date +”\%d-\%m-\%Y”)-db1.sql && /usr/sbin/plesk db dump db2 > /mnt/nasdrive/$(date +”\%d-\%m-\%Y”)-db2.sql


01
08
2019

apachetop kullanımı

Kategorisi : Apache,Linux

apachetop $(ls -Rt /var/www/vhosts/*/logs/access_ssl_log | sed ‘s/^/-f ‘/ | head -15)

komutunu girdikten sonra sırasıyla (f,a,u) tuşlarına basarak sonuçlar arasında filtreleme yapabiliyoruz.


01
08
2019

Linux zararlı trafiği izlemek için MalTrail

Kategorisi : Linux

sudo apt install python-pcapy

RedHat/Fedora için:

sudo dnf install pcapy

github linki

git clone https://github.com/stamparm/maltrail.git

Gerekli güncellemeler için :

cd maltrail; sudo python sensor.py

Sunucuyu başlatalım !

sudo python server.py

Kurduğumuz arayüze gidelim.

http://127.0.0.1:8338;



photo

Php, ajax, jquery, mootools web programlama. Linux, apache, lamp sunucu yönetimi. Cpanel, plesk, lxadmin panel kurulumlari.

18 / 04 / 2024, 21:28:52
Web yazilim, grafik
barbetto.com

Tunalioglu.org - 2015