|
|
wp-cli delete all with custom keep-me table |
Author
ramon fincken
:: Posted: Mon Jan 18, 2021 7:06 pm
:: Category: CMS-ses (Joomla, WordPress, etc..)
Tagged:
Code: | wp-cli post delete $(wp-cli db query --socket=/usr/local/mysql/data/mysql.sock --skip-column-names --batch "SELECT post_id FROM wp_postmeta WHERE post_id < 1010313 AND post_id IN ( SELECT ID FROM wp_posts WHERE post_type = 'attachment' AND ID NOT IN ( SELECT meta_value FROM wp_found ) ) AND meta_key = '_wp_attached_file' LIMIT 200") --force |
you need a limit if you expect many thousands of IDS, this is due to a bash limit, not your WP site or the DB
use at your own risk, this is more complex than you might think!
|
[solution] Letsencrypt Please choose an account |
Author
ramon fincken
:: Posted: Fri Jan 15, 2021 9:58 am
:: Category: Bash, perl, python and CLI linux
Duplicates in your accounts, fix them by pointing to the newest account. MAKE SURE your know which account is the most new.
Code: | /etc/letsencrypt/accounts# find -type d
.
./acme-v01.api.letsencrypt.org
./acme-v01.api.letsencrypt.org/directory
./acme-v01.api.letsencrypt.org/directory/some-old-hash
./acme-v02.api.letsencrypt.org
./acme-v02.api.letsencrypt.org/directory
./acme-v02.api.letsencrypt.org/directory/the-new-hash
/etc/letsencrypt/accounts# rm -rf ./acme-v01.api.letsencrypt.org
|
Code: | cd /etc/letsencrypt/renewal
sed -i 's/some-old-hash/the-new-hash/g' *.conf |
|
[solution] htaccess rewrite to parent folder |
Author
ramon fincken
:: Posted: Fri Dec 13, 2019 12:23 pm
:: Category: PHP coding
when some idiot decides to put a whole site in a (dated) subfolder like
www/2018/
and you want to migrate to another host and set things strait ( meaning www/ ) you will end up with A LOT OF 404 urls
You need to create a 2018 folder and put this in your htaccess to redirect 301 all requests to the parent root folder
Code: | RewriteRule ^(.*)$ https://www.fulldomain.ext/$1 [R=301,L] |
|
[chrome] re-add (unhide) www in address bar |
Author
ramon fincken
:: Posted: Thu Oct 31, 2019 1:34 pm
:: Category: Ubuntu
Tagged: address-bar, chrome, chromium, flags, hide, omnibox, settings, solution, subdomain, subdomains, trivial, ui, un-hide, www
visit
Code: | chrome://flags/#omnibox-ui-hide-steady-state-url-scheme-and-subdomains |
set
Omnibox UI Hide Steady-State URL Trivial Subdomains
to Disabled and restart to see the www. again.
|
[date] Find booking date overlap |
Author
ramon fincken
:: Posted: Fri Jul 05, 2019 7:24 am
:: Category: PHP coding
Booking date checker: start & end = guest wish date.
Must NOT overlap with any known availability start-end periods.
Code:
start-end is exactly the same as non-availability start-end
OR
start-end is within the range as non-availability start-end
start is within the range as non-availability start-end
end is within the range as non-availability start-end
https://pastebin.com/cjYSAGf5
|
Forum |
Topics |
Posts |
Last Post |
General forums |
|
 |
About this blog
Moderator ramon fincken |
4 |
4 |
Mon Jan 05, 2009 5:47 pm ramon fincken  |
 |
Lounge
Chit - chat
Moderator ramon fincken |
61 |
76 |
Wed Oct 22, 2014 8:49 am ramon fincken  |
 |
Reviews
Movie reviews - Goodie reviews and much more !
Moderator ramon fincken |
5 |
5 |
Sun Oct 11, 2009 8:00 pm ramon fincken  |
 |
Rants
Rants about things in daily life ...
|
5 |
11 |
Sun Mar 21, 2010 10:12 pm ramon fincken  |
 |
Ubuntu
A forum about my favourite Operating System!
|
26 |
30 |
Tue Aug 04, 2020 6:27 am ramon fincken  |
The world of freelance |
|
 |
Freelancing
Moderator ramon fincken |
2 |
2 |
Wed Jan 21, 2009 9:52 am ramon fincken  |
 |
Coping with clients
Moderator ramon fincken |
1 |
1 |
Thu Jan 08, 2009 12:00 pm ramon fincken  |
 |
Services
I offer many webdevelopment services such as custom coding, photoshop webdesign and W3 valid slicing and basing !
Feel free to ask for a quote !
Moderator ramon fincken |
1 |
2 |
Sun Mar 21, 2010 2:00 pm ramon fincken  |
Programming |
|
 |
PHP coding
Moderator ramon fincken |
79 |
94 |
Fri Dec 13, 2019 12:23 pm ramon fincken  |
 |
Mysql databases
Moderator ramon fincken |
12 |
14 |
Tue Apr 21, 2015 1:55 pm ramon fincken  |
 |
HTML and other markup&programming languages
Moderator ramon fincken |
30 |
31 |
Sat Jul 28, 2018 5:59 pm ramon fincken  |
 |
Control panels (plesk, cpanel, direct admin)
Moderator ramon fincken |
5 |
8 |
Tue Jun 09, 2015 5:44 am ramon fincken  |
 |
CMS-ses (Joomla, WordPress, etc..)
Moderator ramon fincken |
46 |
62 |
Mon Jan 18, 2021 7:06 pm ramon fincken  |
 |
Bash, perl, python and CLI linux
|
32 |
33 |
Fri Jan 15, 2021 9:58 am ramon fincken  |
Other projects |
|
 |
Antispam
Moderator ramon fincken |
6 |
6 |
Sat Oct 30, 2010 4:37 pm ramon fincken  |
 |
Other projects
Moderator ramon fincken |
17 |
26 |
Sat Dec 27, 2014 1:01 pm ramon fincken  |
Who is Online |
 |
Our users have posted a total of 409 articles We have 26 registered users The newest registered user is MathewCow
|
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest [ Administrator ] [ Moderator ] Most users ever online was 41 on Wed Sep 09, 2015 1:34 am Registered Users: None |
This data is based on users active over the past five minutes |
 |
New posts |
|
 |
No new posts |
|
 |
Forum is locked |
|
|
|