I'm working on an e-commerce X-Cart based that has included a blog part. On my site files I have a folder "blog" where, inside, I have all the WordPress folders, files and so on.
A few weeks ago the site was moved on another server by the host and the PHP version was upgraded from 5.x.x to 7.x.x and that created some problems. The one I can't solve is that I can't login in the admin panel from WP. I always get the error "Sorry, you are not allowed to access this page".
I tried to disable all plugin and theme and nothing changed. Than I created a new admin user from MySQL and same. Using debug I get only this error:
PHP Notice: Undefined index: HTTP_X_FORWARDED_PROTO in httpdocs/blog/wp-config.php on line 93".
The complete code on the line is
require_once(ABSPATH . 'wp-settings.php');
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
But I'm not sure could be linked to the admin login problem.
Any suggestions? I have even seen that my version.php file has
$wp_version = '5.0.7'; and $required_php_version = '5.2.4.' .
Thanks a lot.
mydatabase.wp_users(ID,user_login,user_pass,user_nicename,user_email,user_url,user_registered,user_activation_key,user_status,display_name) VALUES () INSERT INTOmydatabase.wp_usermeta(umeta_id,user_id,meta_key,meta_value) VALUES (NULL, 'my ID', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); INSERT INTOdatabasename.wp_usermeta(umeta_id,user_id,meta_key,meta_value) VALUES (NULL, 'my ID', 'wp_user_level', '10'); - LuchiiiVALUES()in there (I'm guessing you removed it for security reasons? Or maybe you forgot to fill in that part of the query?), make sure the prefixwp_seen in the query is the same one your site uses. - cabrerahector