Not sure its a session issue, i think it has to do with the fact that WordPress Dashboard uses relative links.
A quick hackish fix would be to add
curl_setopt($ch,CURL_COOKIEFILE, ''); // Enables session support
Then, add this after closing the curl handler redirect to the actual dashbard location:
curl_close($ch);
header('location: blog/wordpress/wp-admin/');
die();
Related Posts:
- Programmatic Login from 3rd Party site
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- User registration followed by automatic login
- Uploading media with the REST API
- Adding “Remember Me” in custom login
- cURL 28 error after switch from to brew php 7.2 on localhost
- How to change the wp-login.php page title?
- How build a custom login/register form with error handling?
- Creating a post with the REST API, curl and oauth returning 401 error
- Change the footer text on the login page
- Changing user_nicename
- WordPress 4 invalid username special charachters issue
- How to place login logout link on menu that redirects users back to current page?
- How to turn off redirection from ‘domain.com/login’ to ‘domain.com/wp-login.php’
- How to resolve error “Cookies are blocked due to unexpected output.”?
- Using a nonce in a Custom Login Form
- Constructing a custom login form using ajax
- automated tests as a user?
- Remove username in emails or swap username for email
- woocommerce and is_user_logged_in() if not redirect to homepage
- Use wp_remote_get to get JSON instagram feed from public profile
- Check if user is logged in when clicking certain links on certain pages
- PHP If user is logged in & on home page redirect
- WordPress shows registration link for non logged users
- Admin username and password
- Recovering WP Login Credintials in Code?
- Is it necessary to sanitize wp_set_password user input?
- WordPress custom login form using Ajax
- Where Does WordPress Make cURL Requests? How To Add cURL Option
- How to give new users two specific user role options upon WordPress user registration
- Wp-login appears White Screen, Error: Cannot modify header information
- How to: PHP Log Out Link?
- Login/logout in header
- Why is my cookie not unsetting upon logout? [closed]
- User management system similar to wordpress one?
- export a csv file from the database with a cronjob
- Cannot access wp-admin/wp-login.php (WordPress backend) anymore, what could be wrong?
- How to debug my custom login form looping intermittently
- getting logged in user info (wp-load.php) from parent directory
- get post content of particular post by url
- Problem with login form
- Login to wordpress by clicking a link and specifying usernaname and password in url
- WordPress from url get external source title
- Log in / Log Out Custom Button
- Should `wp_login` be used since it’s deprecated?
- How to redirect users based on role and content of redirect_to?
- Change CSS based on is_user_logged_in
- How to display login form anywhere, when user isn’t logged in, without redirecting?
- How can I open up my administrative panel to everyone?
- How can I add a new row in a separate database when someone registers via WordPress?
- WordPress transient not working with WP Engine
- How to send a HTTP Post request using PHP Curl and WordPress
- One account with multiple logins
- Lost in trying to create user database system
- SOAP Request/Parsing XML From wp_send_json_success
- REST API works in browser and via AJAX but fails via cURL
- Shortcode to log user into current URL
- cURL error 6 on news area, and also won’t auto update
- PHP getting error when trying to access WP-Admin Dashboard
- I installed WordPress locally now how do I login?
- Post to WordPress from another Server via PHP
- If user is logged in not working
- Change homepage content if user is logged in – BuddyPress
- Accessing an API with jQuery and AJAX
- Show login greeting above sub-menu links?
- calling admin-ajax.php from admin-ajax.php
- is_user_logged_in returning nothing on custom page
- Help with accessing wp-admin page and resolving error messages
- Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
- Can’t log in to WordPress wp-admin after adding code to functions.php
- Check if user had autologin & if so, logout
- Admin Panel 404 Error after login
- PHP warning – Use of undefined constant ‘FORCE_SSL_LOGIN’ ‘FORCE_SSL_ADMIN’ on wp-config.php
- How to block specific user id in custom login form?
- Log out without confirmation request (nonce)
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- Call WP Rest-Api to GET /users/me returned NOTHING in console
- Restrict wordpress access to logged users only
- Infinite loop when logging out using custom login form
- Menu not updating for logged in users after redirect
- how to use auth_redirect() redirect visitor to login page if they are not login when they click account and order page?
- Issues adding Recaptcha v3 to WordPress Registration
- Display specific page if user signed in
- Change Login or Logout text based on status
- Refresh page after login with litespeed cache
- Redirect after login depending on the URL
- Contactform7: display results from CURL
- Need help with AJAX login to call php in functions.php to handle redirects based on user cap (role)
- Redirecting the lost password page request when using a custon login page
- How do I send a POST request with params with WordPress REST API
- wp-login.php?redirect_to=https problem
- is_user_logged_in() not working in homepage
- Check if a user is logged into my WordPress site which is on a different server
- Newbie question. Login/Registration. New PHP page
- Adding a sidebar to wp-login.php
- List users in a dropdown for login
- Not logged in when using http
- add bootstrap modal after login in wordpress
- White screen after login attempt
- Redirect users not logged in to the standard login page (and back) from some posts and pages