Cannot access wp-admin after installing SSL – user capabilities not being set

I have tried every single fix on stackexchange and other websites and nothing has resolved the issue.

I have checked to see that wp_ is in front of all my tables.
I have updated http:// to https:// everywhere in the database.
I have tried the FORCE_SSL_ADMIN thing with/without $_SERVER[‘HTTPS’]=’on’
etc.
etc.

I currently have this in my wp-config.php. I have tried placing it at the top at the bottom, and everywhere in between:

define(‘FORCE_SSL_ADMIN’, true);
if ($_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’)
$_SERVER[‘HTTPS’]=’on’;

I currently have this in my htaccess above the wordpress stuff (have also tried putting it below):

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteRule ^(.*) https://www.%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]

I know the issue is because user capabilities are not getting set with https for some reason. I just don’t know why or how to fix it.

For example, all these capabilities are set with http but not https:
[switch_themes] => 1
[edit_themes] => 1
[activate_plugins] => 1
[edit_plugins] => 1
[edit_users] => 1
[edit_files] => 1
etc.

I get: “Sorry, you are not allowed to access this page.” no matter what I’ve tried.

I am about ready to throw in the towel and just offer to pay somebody because I’ve spent 3 days on this now but I figured I’d ask on here first.

Any help would be appreciated!

Read more here:: Cannot access wp-admin after installing SSL – user capabilities not being set

Leave a Reply

Your email address will not be published. Required fields are marked *