It only redirects when accessed directly, as do all files located in wp-admin/
. AJAX requests should work fine regardless of authentication status.
Edit: wp-admin/admin-ajax.php
should not redirect in any situation. Perhaps a plugin is redirecting all unauthenticated users to the homepage? By default, accessing files inside wp-admin/ when not logged in should redirect to the login page.
Related Posts:
- Best way to end WordPress ajax request and why?
- Why use wp_send_json() over echo json_encode()?
- Why not register shortcodes if is_admin dashboard?
- How to pass data parameter to ajax action function handler
- Multiple ajax nonce requests
- Update user meta using with ajax
- WordPress function that makes HTML safe to be sent via AJAX request
- admin-ajax.php returns 0. How do I debug it and fix it?
- How to properly use wp.ajax.post?
- AJAX vs Fragment Caching for W3 Total Cache [closed]
- Detecting post type within init action
- Basic question on passing variables to AJAX in WordPress
- Delete row of custom table in WordPress using AJAX
- jQuery Autocomplete in WordPress
- Metabox cloning via Admin Ajax call issue
- Change theme based on window size
- Serving nonces through AJAX is not refreshing nonce, returning 403 error
- Cannot update my options using wp_ajax
- ajax and nonce when JavaScript is in a seperate file
- Class WP_Rewrite not found
- Prevent wp_debug from polluting ajax within plugin
- How to localize inline script called with ajax
- Conditional Ajax inclusion
- How to allow to user non logged in WP system upload in media library?
- WordPress function to get term or post object by id
- wp-admin AJAX with Fetch API is done without user
- Ajax stops working when logged in?
- WordPress ajax get content post id
- Populating content dynamically via AJAX and Advanced Custom Fields [closed]
- Create Page With wp_insert_post() and AJAX
- Load ajax if is_home()
- Populate a Map at The Same Time as showing Posts via AJAX
- wp_localize_script not working on ajax response
- Get wp_title wp ajax
- Why Does WordPress not output admin-ajax.php path by default?
- Ajax custom search not functioning as expected
- Jetpack Infinite Scroll – Add more than 7 posts each time?
- SSO autologin WordPress + Ajax
- Speed/Performance difference between `wp_ajax` and `init` checks for AJAX/POST requests?
- Test WordPress api with postman
- How to handle 400 status in Ajax [duplicate]
- Remove trailing 0 from function that is used both statically and dynamically
- How to process wordpress ajax call without action parameter?
- How to load next and previous posts by Ajax
- Update attachment metadata fails
- WordPress ajax works on FF but not on IE & chrome
- Disallow second login session
- All AJAX requests return a 400 error
- Unable to successfully verify nonce
- Create custom POST Method URL
- POST Ajax bad request
- Getting a variable using $post ajax back from php to js response in WP
- WordPress is Not Setting PHP $_POST on Custom Ajax
- Ajax for subscibers not working
- Is it possible to determine whether a page is a page template by page_id in ajax call?
- How to stop being directed to admin.php after sending request to admin-ajax.php
- 200 return code on ‘POST /wp-admin/admin-ajax.php’ while NOT logged in
- i’m trying to get all my media query attachments via ajax in wordpress
- Distinguish between 2 instances of admin-ajax.php
- How to update post with Ajax (no plugin)
- Next Ajax call doesn’t work
- Ajax page load without reload
- need a confirmation text to appear on email submission
- Including ‘wp-load.php’ after another include() generates an error
- How to make pages that arent indexed for ajax applications
- Why does reCAPTCHA v3 return 0 ? In custom AJAX registration form
- admin-ajax.php 400 bad request
- WordPress Ajax Page Load to skip embedded iframe
- edit user input data contact form 7
- WordPress POST AJAX call, var_dump($_POST) NULL and AJAX response empty when inside ob_start
- Set cors header for ajax requests
- Simple AJAX code that refreshes every x seconds?
- How to keep scripts persistent during admin-ajax process when saving widget?
- Very weird bug: Ajax for non-admins
- Search function – problem with whole words
- jQuery ajax method does not return data
- WordPress 403 error on form submission with Ajax
- Ajax is not defined
- Get posts by category via ajax
- Download doccument on server rather than clients browser
- Load oEmbed iframe within ajax call
- Adding pagination to Ajax Query
- WordPress 4.9.6 – IncludeMe & getAjax GET using wrong URL
- Create secondary Archive page format?
- Get post details with pure javascript ajax
- WorddPress website admin part not working correctly – I think ajax/json issue
- Ajax Security regarding user priviliges and nonces
- How to populate data from JSON using AJAX in TypeScript? [closed]
- Use ajax without a plugin?
- Weird admin-ajax.php problem
- Ajax contact form returnig 0
- Know which script/page is being called by ajax call
- Can’t update WP Editor after Ajax
- Posting to loop.php file
- Can’t access data from database using AJAX
- Translating wordpress foreach to ajax
- AJAX loading with custom parameters
- Adding custom fields to Wired Impact Volunteer Management Plugin
- How to update my jquery/PHP function to add/remove user as favorites in (WordPress) users list
- randomly get 400 error while user is logged in wp_ajax