HEX
Server: nginx/1.18.0
System: Linux vps-9dcdb12e 5.15.0-176-generic #186-Ubuntu SMP Fri Mar 13 11:01:42 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.24
Disabled: exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
Upload Files
File: //tmp/setdate.sh
#!/bin/bash
SLUG="gabinet-masazu-piotr-czajkowski-kielce"
python3 -c "import json; [print(k+'|'+v) for k,v in json.load(open('/tmp/dates.json')).items()]" | while IFS='|' read d dt; do
  P="/var/www/$d"
  [ ! -f "$P/wp-config.php" ] && continue
  WPU="sudo -u www-data wp --path=$P --allow-root --skip-themes --skip-plugins"
  pid=$($WPU post list --post_type=post --name="$SLUG" --field=ID 2>/dev/null | head -1)
  [ -z "$pid" ] && continue
  $WPU post update $pid --post_date="$dt" --post_date_gmt="$dt" >/dev/null 2>&1
  pfx=$($WPU db prefix 2>/dev/null)
  $WPU db query "UPDATE ${pfx}posts SET post_modified='$dt', post_modified_gmt='$dt' WHERE ID=$pid" >/dev/null 2>&1
  echo "$d|$($WPU post get $pid --field=post_date 2>/dev/null)"
done