3

I'm getting too many redirects issue on my WordPress project. So I've tried to find the reason and it seems to be the site url.

The thing is that the site url is correct on the database - https://dev.mydomain.com

But when I debug it with site_url() function it returns - http://dev.mydomain.com

Have tried to set the site url in wp-config.php and functions.php, but it didn't help.

We have installed Divi theme. Also wp-admin is not openning.

Any help will be appreciated. Thanks in advance!!


UPDATE

Have just fixed it by adding $_SERVER['HTTPS'] = 'on'; in functions.php

But anyway can't understand why would I need to do that and is it ok.


UPDATE

Now the website works fine, but I can't open wp-admin. It says - Sorry, you are not allowed to access this page.

0 Answers0