I configured a website based on WordPress. Every time i publish a post or upload an image i get logged out of admin panel and can not login again; I can login only if i close the window and then login with my username and password.
I did some research on the problem and a lot of people mentioned it is because of Site URL and Home URL being different, so i did make sure they are not (now they both have "https://" and "www"). Even i set "WP_HOME" and "WP_SITEURL" in wp-config.php file to be identical as well and checked the database table for these values.
Also i thought it may be a custom theme or a plugin issue so i deactivated all the plugins and changed back to default theme but it did not solve the problem. So i think it's not a theme or plugin issue.
Any idea how to solve this?