Assuming you use the correct URL to access the file, everything is being handled in your web server level and WP doesn’t run at all, so WP based solutions like changing rewrite rules will not help you.
It is most likely that there is some web server configuration that sends the 404 for any access to a php file at that folder (guess you should try if other php files there also return 404). You might be able to fix the web server configuration to match your needs, but as @EAMann commented, it is not the right way to write ajax for WP.
Related Posts:
- How exactly do automatic updates work?
- What is in media-template.php, and how does it work?
- add_action in namespace not working
- How to check if image is already stored in a site’s post database? (network)
- How to add some custom HTML to the edit posts page
- Add Useragent to the body class?
- How to disable wordpress confirmation email for new users
- How can I get an XML export of my 1K+ posts WordPress instance?
- tag search using WP_Query
- Retrieving all data from repeater fields
- Loading page template into shortcode
- Unable to post simple form data in HTML
- dynamic sidebar not showing anything
- How to get Poster (thumbnail) Image of Video
- javaScript in section of WP API
- PHP code to call image Caption, Alternative Text, and Decription?
- How to implement Google Tag Manager? [closed]
- How to rewrite URL with PHP variables with htaccess to a normal looking URL?
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Can’t get wp_insert_post to work
- Why not yield/iterable in posts interface?
- How to: PHP Log Out Link?
- 200 Rewrite blog post links
- PHP Fatal error: Uncaught mysqli_sql_exception: Table doesn’t exist in wordpress/wp-includes/wp-db.php
- code is skipping a div
- Avoid parallax images hardcoding
- The response is not a valid JSON response, wordpress problems?
- Firing schema via code in functions.php doesn’t work
- How to use wp_add_inline_style for custom CSS added via shortcode?
- Blog posts repeat
- Dot is not added at the end of href
- Getting error when using wp_insert_post()
- How to access variables from Functions file in theme files
- How can I modify footer when footer.php calls to another file?
- retrieve post data and insert it in seperate static html page without WordPress
- PHP conditional script issue
- WordPress plugin: render only page content using ajax call
- My php code is not being executed
- Using Shortcode to Grab Archive Listing, Separate by Year
- working with term_relationships table
- Find Site ID From WP_Post
- How to show meta value code HTML after x paragraph
- change the default order of posts only for specific categories
- Array to string conversion error in PHP 7.2 when returning user role as class
- Check class_exists before class definition / Doxygen problem
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- How can I get “Previous” and “Next” to show in the navigation besides the links?
- Splitting the_content() by size?
- with PHP within splits the link
- WordPress And High disk i/o
- Saving a post ID to use in a form elsewhere on website
- How to Fix an Archive.php That Displays All Posts?
- Dynamically replicate custom metabox in custom post type
- random reason on refresh
- How to tell if a user has gone in and created a menu
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- WordPress Fresh Install Errors (Woocommerce specifically now)
- Tracking Visitor LatLng with WordPress using JS, PHP. How to put data which was extract using JS into DB
- Create shortcode for metabox gallery
- how do i add custom widget woocommerce shop page with php
- WordPress redirect to a subpage – how to create a template for subpage?
- How can I redefine WordPress wp-content directory programmatically?
- Trim Titles Only On Some Pages
- code that I can run, or a plug in to show what sql tables something pulls information from
- Automatic email message after manual user approval
- Display attached images of a page or post that are insetred using gallery
- overwrite wordpress gallery with custom gallery shortcode
- Upgrade to PHP7.3 and Changing Apache from Prefork to Event Breaks WordPress
- Return author name as a tag using get_author
- How to pull date/time in french format for wordpress post?
- WooCommerce subcategories help
- dynamically change content of div with php
- Custom WordPress Core upgrade through wp-cli
- What is wrong with this shortcode? to include external php file in WordPress posts
- add a value to an external link query in searchform
- ACF + WP + Slick Slider Repeater Slide Group PHP not Displaying [closed]
- wp_query beginner
- Crop an image after upload on custom account page
- Migrating a live WordPress website to a Local Server: why some elements of the website are missing?
- Store stripe info as user_meta
- Is there a way to have chunks of a page’s content expire?
- Showing the project type in HREF
- INCOMING: Wall of code for form and $_POST, not updating custom field’s value
- WooCommerce – Print Processing orders [closed]
- Loop returns more items than exist?
- Adding theme strings to .PO file
- Rewriting to a different page based on existence of query string?
- Host does not allow remote connection, so how do I transfer data to my WordPress site?
- I am extending Walker_Nav_Menu: How can I get the number of children elements of the current item?
- How to call a specific value within the functions.php file?
- WordPress plugin/code to to to next/previous post in same category
- WordPress White Screen Error
- Set post to draft if matching word is found in the post
- Warning: filemtime(): stat failed for wp_
- How to transfer session after being redirected to other page
- Keep users logged in Without Remember Me
- How to use js variable to php in wordpress functions.php
- Display total count of products in orders of a specific order status
- How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?
- Custom Post Type doesn’t have template content when creating programmatically in PHP but does when created in WP Admin