Support » Networking WordPress » admin-ajax.php not found when inserting media in directory-based subsites

  • Resolved bradkamradt


    Hi. I have a fresh install of WordPress multisite in its own directory. Primary blog — which works fine — is at the root. Subsites are directory-based. We are running no plugins and only default WP themes. .htaccess and wp-config.php mods have been copied and recopied directly from the Network Setup WP Dashboard.

    The problem we’re experiencing is that subsite admins cannot insert media into their pages and posts. (Uploads are fine, but “Add Media” insertions fail.) Console inspection reveals that admin-ajax.php is not found on subsites; it appears WP is looking for it at instead of or

    Hope this makes sense. I have no idea how to address this issue and need a solution ASAP for a training initiative that’s about to begin. Any suggestions? THANKS SO MUCH!

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter bradkamradt


    Can’t change hosting due to organizational constraints.

    Just created a new account on the server and built up a fresh WP install. Tested image insert. All was well. Converted to multisite. All was well. Created first subsite in the network and I’m back to ajax-admin.php being 404 not found within that subsite when I try to insert an already uploaded image into a page or post.

    Still wonder if this is because the WP install is looking for admin-ajax.php at instead of Even if that’s the case, I still don’t know how to fix the problem.

    Any other ideas out there? I’m in a real jam here and need a solution ASAP.

    Thread Starter bradkamradt


    FOOTNOTE: Compounding this mystery is that I have an already established WordPress multisite instance on a second, supposedly identical server where I do NOT have this issue.

    Is it possible this has to do with starting fresh using 4.7.3 for these most recent sites whereas the fully functional instance was launched some time ago and upgraded?

    Thread Starter bradkamradt



    This really does seem to be specific to the “Insert image into post action.”

    Here’s a screenshot of that shows what I believe are two unsuccessful image insertion attempts (404s) mixed with normal “heartbeat” activity (200s).

    Seriously, WTF?!?!?!?

    Alternatively, you can switch to html view, and insert an image by doing this syntax: <img src="image_url" alt="desired_alt_text" style="desired_styles"/>.
    For this instance… I insert my images on my website… you can take a look of my example site: Since I don’t use a WYSIWYG editor… i use the text version of the post editor,–enabling me to write code. Keep in mind… my site has few images. If you managed to find one of my pages with other images… you can view cource of my webpage, and figure out how do I do it,–if you ‘re not familiar with typing html code.

    As I went back to your website… I encountered these errors below:
    Earlier… there was a 500 internal server error.
    Recent error below,–after I attempted to insert image to my page and save draft:
    Session ID:
    Event ID:
    Source IP:
    Thu, 16 Mar 2017 15:42:25 GMT

    Thread Starter bradkamradt


    Turns out this is 100% related to my host’s web application firewall. Currently working with them on an IP-based whitelist/exclusion solution for admin-ajax.php and a couple of other files that we’ve discovered are also being blocked. Thanks for the help and input!

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘admin-ajax.php not found when inserting media in directory-based subsites’ is closed to new replies.