I have inherited a WP multisite without the access to the main site (network admin). I need to install a plugin and have unpacked it via FTP but need to enable it and can't. Any way of doing this via MySQL?
2 Answers
There's an option in the wp_sitemeta table with meta_key 'menu_items'
this value is referred to the checkbox "Administration menu" of the page /wp-admin/network/settings.php (accessible only to siteadmins) that allows the activation of plugins on single sites.
I've not tested but using the value a:1:{s:7:"plugins";s:1:"1";}
and having the plugin uploaded via ftp you should see the plugin page on the site you've access to..
-
@kaperto @andrea I don't have the
_sitemeta
table? prntscr.com/kd9tln– sixliCommented Aug 1, 2018 at 9:10 -
-
you're looking into a paginate sidebar of tables? I see wp_14 as prefix in your screenshot Commented Aug 1, 2018 at 9:16
-
looking at some other installs I have from Softaculous, the don't have that table either (basic WP installs, not even multisite)– sixliCommented Aug 1, 2018 at 9:18
-
_sitemeta is specific for multisite you will not find in a standard installation Commented Aug 1, 2018 at 9:21
If you have SQL acces, you can change your account privileges to become a super-admin.
To do that, got to the table ..._sitemeta
and add your username to the option site_admins
. It's a serialized array then if you have already a user admin
, you will put something like a:2:{i:0;s:5:"admin";i:1;s:5:"sixli";}
.
look the manual for https://secure.php.net/serialize
-
of course this answer @Kaperto is much stronger , I would say "resolutive"!! lol, mine is less intrusive Commented Aug 1, 2018 at 9:02
-
thanks @Kaperto - any ideas on why I don't have the _sitemap table?– sixliCommented Aug 1, 2018 at 9:20