İçeriğe geç
KAMPANYA Kurumsal Web Paketi — $499'dan başlayan fiyatlar Web & Logo Tasarımı · Kurumsal E-posta · LiteSpeed + CloudLinux · Imunify360 Güvenlik · cPanel Yönetim · 3 Gbps DDoS Koruması 00 Gün 00 Saat 00 Dk 00 Sn
AIOR

Plesk WP Toolkit “Unable to get site administrator settings” Error Fix (s

Sektör topluluğu — sorularınız, deneyimleriniz ve duyurularınız için.

Plesk WP Toolkit “Unable to get site administrator settings” Error Fix (s

Aior

Administrator
Staff member
Joined
Apr 2, 2023
Messages
895
Reaction score
2
Points
18
Age
40
Location
Turkey
Website
aior.com
1/3
Thread owner

Plesk WP Toolkit "Unable to get site administrator settings" Hatası Çözümü (WP_User_Query'de stdClass TypeError)​


Genel Bakış​

Bu makale Plesk WP Toolkit'te admin bilgisinin alınamadığı ve aşağıdaki hatanın göründüğü kritik bir sorunu açıklar:
Code:
Unable to get site administrator settings:
PHP Warning: Object of class stdClass could not be converted to int
PHP Fatal error: Cannot access offset of type stdClass on array

Sorun WordPress frontend ve admin paneli normal çalışırken bile olabilir. Çoğu durumda başarısızlık yalnızca WP Toolkit içinde görünür.

Semptomlar​

  • WP Toolkit "Unable to get site administrator settings" gösterir.
  • WordPress frontend normal çalışır.
  • WordPress admin paneli normal çalışır.
  • wp-cli komutları manuel çalışır.
  • Hata yalnızca WP Toolkit içinde görünür.

Kök Neden​

Sorun PHP ortamları ve cached query verisi arasında uyuşmazlıktan kaynaklanır.
  • WP Toolkit sistem CLI'sinden farklı PHP binary kullanır.
  • CloudLinux alt-php Plesk PHP'den farklı davranır.
  • Redis object cache bozulmuş veri döndürebilir.
  • WP_User_Query beklenen array yerine stdClass alır.

Örnek uyuşmazlık:
Code:
WP Toolkit PHP: /opt/alt/php84/usr/bin/php
Manuel CLI PHP: /usr/bin/php, /opt/plesk/php/8.3/bin/php

Teknik Açıklama​

WordPress kullanıcıları almak için WP_User_Query kullanır. Query filtreleri veya cache yanlış veri döndürürse:
  • Array yerine stdClass döndürülür.
  • PHP 8+ strict typing fatal error tetikler.

Yaygın problemli hook'lar:
Code:
users_pre_query, pre_user_query

Adım 1 CLI PHP MySQL Desteği Kontrol​

Code:
php -m | grep -E 'mysqli|pdo_mysql|mysqlnd'
Eksikse:
Code:
dnf install -y php-mysqlnd

Adım 2 WP CLI Çalışıyor mu Doğrula​

Code:
wp --allow-root user list
wp --allow-root --skip-plugins user list
wp --allow-root --skip-themes user list

Adım 3 WP Toolkit Ortamını Tekrarla​

Code:
plesk ext wp-toolkit --wp-cli -instance-id 2 -- user list --role=administrator --format=json
Bu başarısız ama normal wp çalışıyorsa, sorun ortama özgüdür.

Adım 4 PHP Farkını Tanımla​

WP Toolkit'in hangi PHP'yi kullandığını kontrol edin. Örnek:
Code:
/opt/alt/php84/usr/bin/php

Adım 5 WP Toolkit Instance Doğrula​

Code:
plesk ext wp-toolkit --list
plesk ext wp-toolkit --info -instance-id 2

Adım 6 WP Toolkit Cache Temizle​

Code:
plesk ext wp-toolkit --clear-cache -instance-id 2
systemctl restart sw-engine
systemctl restart psa

Adım 7 Redis'i Geçici Devre Dışı Bırak​

Code:
wp --allow-root plugin deactivate redis-cache
Sonra test edin.

Adım 8 Redis Cache Flush​

Redis kontrol:
Code:
redis-cli PING
Beklenen: PONG
Cache flush:
Code:
redis-cli FLUSHALL

Adım 9 Redis'i Dikkatli Yeniden Etkinleştir​

Code:
wp --allow-root plugin activate redis-cache
Yeniden başarısız olursa Redis yapılandırması uyumsuz.

Adım 10 Özel Eklentileri İncele​

Kullanıcı sorgularını, gettext filtrelerini, global query hook'larını, object caching'i, admin hook'ları etkileyen eklentileri kontrol edin.

Adım 11 Opsiyonel Derin WP Toolkit Reset​

Code:
rm -rf /usr/local/psa/var/modules/wp-toolkit/*
systemctl restart sw-engine

Güvenli Sorun Giderme Akışı​

  1. CLI PHP MySQL extension'ları kontrol et.
  2. wp-cli çalıştığını doğrula.
  3. WP Toolkit hatasını tekrarla.
  4. WP Toolkit cache'i temizle.
  5. Redis'i devre dışı bırak.
  6. Redis flush.
  7. WP Toolkit'i yeniden test et.
  8. Redis'i dikkatli yeniden etkinleştir.
  9. Özel eklentileri kontrol et.

Anahtar İçgörü​

Bu bir WordPress core bug'ı değildir. Neden:
  • Ortam uyuşmazlığı.
  • Cache bozulması.
  • PHP strict typing.

Sonuç​

Bu sorun net bir desen izler:
  • WordPress normal çalışır.
  • WP Toolkit başarısız olur.
  • Farklı PHP ortamları kullanılır.
  • Cached veri tip hatalarına neden olur.

PHP ortamlarını hizalayarak ve cache katmanlarını sıfırlayarak sorun tamamen çözülebilir.


Plesk WP Toolkit "Unable to get site administrator settings" Error Fix (stdClass TypeError in WP_User_Query)​


Overview​

This article explains a critical issue in Plesk WP Toolkit where administrator information cannot be retrieved:
Code:
Unable to get site administrator settings:
PHP Warning: Object of class stdClass could not be converted to int
PHP Fatal error: Cannot access offset of type stdClass on array

The problem may occur even when the WordPress frontend and admin panel work normally.

Symptoms​

  • WP Toolkit shows "Unable to get site administrator settings".
  • WordPress frontend works normally.
  • WordPress admin panel works normally.
  • wp-cli commands work manually.
  • Error appears only inside WP Toolkit.

Root Cause​

  • WP Toolkit uses a different PHP binary than system CLI.
  • CloudLinux alt-php behaves differently than Plesk PHP.
  • Redis object cache may return corrupted data.
  • WP_User_Query receives stdClass instead of expected array.

Example:
Code:
WP Toolkit PHP: /opt/alt/php84/usr/bin/php
Manual CLI PHP: /usr/bin/php, /opt/plesk/php/8.3/bin/php

Technical Explanation​

If query filters or cache return incorrect data:
  • stdClass is returned instead of array.
  • PHP 8+ strict typing triggers fatal error.

Common problematic hooks:
Code:
users_pre_query, pre_user_query

Step 1 Check PHP CLI MySQL Support​

Code:
php -m | grep -E 'mysqli|pdo_mysql|mysqlnd'
If missing:
Code:
dnf install -y php-mysqlnd

Step 2 Verify WP CLI Works​

Code:
wp --allow-root user list
wp --allow-root --skip-plugins user list
wp --allow-root --skip-themes user list

Step 3 Reproduce WP Toolkit Environment​

Code:
plesk ext wp-toolkit --wp-cli -instance-id 2 -- user list --role=administrator --format=json

Step 4 Identify PHP Difference​

Check which PHP WP Toolkit uses. Example:
Code:
/opt/alt/php84/usr/bin/php

Step 5 Verify WP Toolkit Instance​

Code:
plesk ext wp-toolkit --list
plesk ext wp-toolkit --info -instance-id 2

Step 6 Clear WP Toolkit Cache​

Code:
plesk ext wp-toolkit --clear-cache -instance-id 2
systemctl restart sw-engine
systemctl restart psa

Step 7 Disable Redis Temporarily​

Code:
wp --allow-root plugin deactivate redis-cache

Step 8 Flush Redis Cache​

Redis check:
Code:
redis-cli PING
Expected: PONG
Flush:
Code:
redis-cli FLUSHALL

Step 9 Reactivate Redis Carefully​

Code:
wp --allow-root plugin activate redis-cache

Step 10 Review Custom Plugins​

Check plugins affecting user queries, gettext filters, global query hooks, object caching, admin hooks.

Step 11 Optional Deep WP Toolkit Reset​

Code:
rm -rf /usr/local/psa/var/modules/wp-toolkit/*
systemctl restart sw-engine

Safe Troubleshooting Flow​

  1. Check CLI PHP MySQL extensions.
  2. Verify wp-cli works.
  3. Reproduce WP Toolkit error.
  4. Clear WP Toolkit cache.
  5. Disable Redis.
  6. Flush Redis.
  7. Retest WP Toolkit.
  8. Reactivate Redis carefully.
  9. Check custom plugins.

Key Insight​

This is not a WordPress core bug. It is caused by environment mismatch, cache corruption, and PHP strict typing.

Conclusion​

By aligning PHP environments and resetting cache layers, the issue can be fully resolved.
 
Last edited:

Forum statistics

Threads
891
Messages
898
Members
27
Latest member
AIORAli

Members online

No members online now.

Featured content

AIOR
AIOR TEKNOLOJİ

Tüm ihtiyaçlarınız için Teklif alın

Hosting · Domain · Sunucu · Tasarım · Yazılım · Mühendislik · Sektörel Çözümler

Teklif al

7/24 Destek · Anında yanıt

Back
Top