I use cloudflare via the cloudflare plugin, have SSL enabled.

Enabled ssl within the wp-config.php file:



$_SERVER['HTTPS'] = 'on';

Everything seems to work fine on the main site, but when trying to login to admin I see:

You do not have sufficient permissions to access this page.

This started after going into general settings and adjusting the 'Home' and 'Site URL' options.

Following guides, I am able to get the page to appear (instead of being stuck in an infinite redirection loop).

I'm not sure what else to change here, as I've just lost permissions out right after switching to https everywhere.


You need to forward the http:// to https:// to avoid infinite loop.

if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
  • Thanks for the comment! The infinite loop was deal with using that strategy :). Now, the loop is "fixed" but I receive: You do not have sufficient permissions to access this page... Upon login attempt. May 5 '15 at 17:16
  • @DerpleGerbensterp Were you able to fix that? It would be good if you share the solution for others.
    – m4n0
    Feb 9 '16 at 9:38

The fellow above was correct, however the string MUST be above:

require_once(ABSPATH . 'wp-settings.php');

This is located within wp-config.php :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.