0

I couldn't find an answer to this in other relevant threads.

I'm trying to upload a PDF (1.4 MB) to WordPress using the media uploader and I get this response:

Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.

This is on shared linux hosting at Godaddy.

What I've tried:

  • Disable each plugin individually

  • Change to wordpress twentytwenty theme

  • Raised config settings in user.ini

    max_execution_time upload_max_filesize post_max_size max_input_vars memory_limit client_max_body_size

  • Log in incognito mode

  • Clean install of wordpress on live server

  • Changed wp-content and uploads (+ subdirectories) file permissions to 755

  • Made async-upload.php DOING_AJAX without if statements

The error log shows nothing.

In the server logs I have found a 404 for async-upload.php, which I suspect is the root of the problem, but I don't know what to do with it. (async-upload.php file is definately there).

Does anyone have any advice on this?

Thanks

arthurrandom
  • 58
  • 2
  • 7
  • 1
    What do you see in the browser console and network panel? _“(async-upload.php file is definately there)”_ - definitively _where_? Are you sure URL path and filesystem location match? – CBroe Jul 03 '20 at 11:01
  • Yes they definately match. In the console I have an XHR for http://example.com/wp-admin/async-upload.php, and in network panel its the same. The file does exist at that location. – arthurrandom Jul 03 '20 at 12:55
  • The network panel doens't show any response returned, there's no status code to go with it. – arthurrandom Jul 03 '20 at 12:56
  • Have you checked the server _error_ log? (That 404 you mentioned, is probably rather from the access log, I suppose.) Also make sure full PHP error reporting is enabled, and WP put into debug mode. – CBroe Jul 03 '20 at 14:08
  • I ended up solving it with the host's help. The problem was a corrupted PDF file. Thanks very much for your help. – arthurrandom Jul 03 '20 at 15:02

1 Answers1

1

It was a corrupted PDF. The first thing I should have checked.

arthurrandom
  • 58
  • 2
  • 7