Hiya,
So this is going to be a bit of a lengthy post, since there’s a few steps to be taken to ensure we get everything correct ??
What you should do before any of these steps, is take a backup if possible. We’ll guide you through the steps, but typographical errors can happen, so just to be safe, it’s always wise to have a backup.
—
The first thing you want to do, is to prevent the shortcode from running on your site and making problems once your login is restored. You mentioned cPanel, which is great as this gives all the tools needed both to do that, and restore your access.
You will want to use the “File Manager” option (I’d show screenshots, but many hosts use custom themes, so not sure that would help you in this case, but the name should be the same always.
Use it to navigate to the folder wp-content/plugins
, and locate the plugin that caused problems for you. Delete the folder for that plugin (not the whole wp-content/plugins folder
, only that one particular sub-directory).
Now that the plugin can no longer run, let’s sort out your account. Open the database manager by clicking the “phpMyAdmin” link, this should show you a list of database tables as links in the sidebar. Your installation may not be using the default prefix for these, but my instructions will presume they do. The default value is wp_
, so if you do not see that as the first part of the names on the side, just replace that in my examples below with whatever common piece of text is shown before on all of yours.
Start by going to wp_users
, and look for the row with your username and email on it, we need this to see what reference number you have in the database. Once you have found it, take note of the number in the very first column (named ID
), this is your User ID, and is what is referenced everywhere else in the database.
Next, move over to the table named wp_usermeta
, here you may find it beneficial to use the search feature, so pick that at the top of your screen inside the wp_usermeta
table, and in the field user_id
, enter the ID number you noted down previously, and in the meta_key
field, enter the text wp_capabilities
You should now be presented with just a single row, to restore your user access, hit the little “Edit” link on the side of this row, and in the field named meta_value
add the following text a:1:{s:13:"administrator";s:1:"1";}
Hit save, and that should be it, you should now hopefully be able to log back in to your site.
—
You may also wish to reach out to the plugin authors of the plugin you were testing, as it seems odd that a shortcode would modify your users access rights, and that’s something they may want to look into ??