I solved my problem, and it could definitely help others too.
The problem was with cookies since my folder structure was like this :
- mysite.com
- mysite.com/mypage.php
- mysite/wordpress/
the cookies were only valid for wordpress folder, and it’s subdirectories.
In order to activate the cookies outside wordpress, I installed the root Cookie plugin, and everything works fine now.
P.S.
Do NOT change the configuration of root Cookie. Just leave the Domain Name setting as empty.
Related Posts:
- Removing username from the ‘wordpress_logged_in’ cookie
- Disable WordPress 3.6 idle logout / login modal window / session expiration
- How to fake a WordPress login?
- One time login on 2 different WordPress sites
- Get WordPress logged in username from root domain when WP is installed in a subfolder
- Can’t log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
- How can I redirect user after entering wrong password?
- Preventing session timeout
- Custom login form
- Prevent wp_login_form() from redirecting to wp-admin when there are errors
- How do I change the language of only the login page?
- Does wp_logout_url() destroy a session? (Logging out question)
- Can not login with correct username and password
- How can I add a custom script to footer of login page?
- How to keep always logged in development environment
- custom login page redirect to logged in user profile page
- How to customise wp-login.php only for users who are setting a password for the first time?
- How can I test the login for an expired session?
- WordPress Login Footer URL
- Remove built in wordpress login and use only google auth
- Cookie settings for session across WPML subdomains using custom AJAX login
- Login redirect_to loop with reauth=1, cookie expiry set to 1 year in past
- Change Login Page for a Multisite Subsite
- send users logging in from wp-login.php directly to home page of site, rather than dashboard
- Get user ID after logging in
- Login with cookie but without using WordPress code
- Get wordpress stored cookies for custom login
- how to logout user on browser tab or window closes
- Login cookie across multiple domains on network w/ mapping
- Can’t login after URL change
- Custom Connect to Facebook, problem logging in/logging out
- How to set different cookies for logged in admin users and logged in non admin users?
- How can I test the login for an expired session?
- How does WordPress handle sessions?
- How to get session token of current user in wp_login hook?
- Add class to input form in login form
- Allow access to a page for admins only
- Customizing login error messages
- Customizing the WordPress login form
- Restricting frontend acess based on user role otherwise redirect to login form
- how to restrict user login whenever if a user puts on hold by editing wp-login action?
- How do I force “users must be registered and logged in” on subsites?
- deny IPs from wp-login using .htaccess
- Login error redirecting to wp-login page
- How can I prevent my custom form from redirecting to wp-login?
- Custom Login iframe doesn’t work
- Password reset – Disabled for LDAP accounts
- WordPress as webapp login session
- Replace dash with space in username on login
- Autologin only working the second time
- replace wp-login.php login forms via a hook & use custom forms with wp-login form validation
- Session Experies and Get Logged Out Within Few Minutes
- Auto login between word press subdomain and a .net website
- Disabling standard registration login with username/email and password?
- WordPress error on log out ‘Not Permitted’ and can’t log out
- Redirect wp-login
- Is wp_login_form secure on a non secure page?
- Is the login encrypted before it is sent? If so how to do I encrypt it the same way?
- Is there anyway to get the inputted password string from the login form?
- Login and Forgot password in Lightbox
- Forcing frontend login with UI switch
- Getting a person’s username from a wordpress cookie
- Prevent display password on wp-login.php
- Change default login auth
- WordPress SSL not working [closed]
- Where is the php file, that does the checks for login information?
- Alert Message through email or phone(Message)
- Moving from one host to another – cannot access the dashboard
- How are all users now set to inactive?
- How to force “remember me” users to login again?
- Multiple issues with Ajax login function due to browsers and cookies
- Sharing a logged in session with a custom subdmain site?
- woocommerce store login not working at first time
- How do I change the language of the login page to Arabic?
- How to add custom authentication to wordpress login and register
- Problem in auto login after registration
- Login form does not store/remember/suggest users password
- Custom user roles are unable to login
- wordpress login loop and session problem
- wp-cron event doesn’t run when custom login API is enabled
- Styling WordPress login page – Can I change the markup on the login page?
- Extend Cookie with auth_cookie_expiration not working
- Special link for no automatic login (no username and no password)
- Modify wp-login.php Labels Conditionally Based On Referring URL
- WordPress Login & Register works in localhost but don’t work on server
- How to login to wordpress via Cpanel
- Why deleting/removing cookies in WordPress does not log me out from admin?
- Make WordPress User Name the Email Address When Register
- Why WordPress not logout after I have close my browser?
- How to place wp-login.php in page or page template?
- Webpage not found upon entering wrong username and password on custom login form?
- Can’t login through wp-login.php on fresh installation
- WordPress Cookies – wp_set_auth_cookie
- Hide wp-login.php but not the widget
- User not logged first time I open the homepage
- Share login status across subdomains without network
- Logging in takes a few refreshes to show you are logged in, is this a cache issue? [closed]
- How to limit user to login only once per session
- Remove login link from Reset Password-screen
- Why am I not able to login to the admin