Screen options (WordPress)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

Individual WordPress screen options are stored in table wp_usermeta. E.g.:

select
   meta_value
from
   wp_usermeta
where
   user_id=4
   and
   meta_key = 'metaboxhidden_dashboard';

Output (line breaks inserted by me):

a:12:{i:0;s:19:"dashboard_right_now";i:1;s:18:"dashboard_activity";i:2;s:28:"woocommerce_dashboard_status";i:3;
s:32:"wordfence_activity_report_widget";i:4;s:36:"woocommerce_dashboard_recent_reviews";i:5;
s:32:"wp_mail_smtp_reports_widget_lite";i:6;s:32:"wpseo-wincher-dashboard-overview";i:7;
s:21:"dashboard_quick_press";i:8;s:17:"dashboard_primary";i:9;s:24:"wpseo-dashboard-overview";i:10;
s:21:"dashboard_site_health";i:11;s:18:"rg_forms_dashboard";}

As far as I know (2023.11), there is no WP-CLI command to manage these settings.

Since this is serialized data, maybe Wp eval (WP-CLI) can help?

See also