Cannot Add New Media - Unexpected response from server


I am using WordPress with Nginx and PHP 7.4.

I am facing a problem when trying to Add New Media. Whenever I try to upload a file like around 18MB or higher I am faced with the following message:

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

When I inspect that section in the browser it shows:
Failed to load resource: the server responded with a status of 403 (Forbidden)

Please note that I am able to upload files like around 10MB successfully and I can see them in the library.

Knowing that 403 is usually related to permission I went to the WP folder and checked the permission on all core folders (wp-admin, wp-contents, wp-includes), and it has the permission drwxrwxr-x+

I am not sure how further I should troubleshoot, if someone can guide me on what should I do to fix this as it is frustrating.

1 Reply

Hey there -

This is just a thought, but you might need to increase the maximum upload size for your WordPress instance. Here's a guide that shows you how:

How to Increase the Maximum File Upload Size in WordPress

In short, the linked page lets you know that you can go to Media --> Add New, and there you'll find the maximum size that you have set. If you need to increase the size, there are three ways detailed in that linked post that should help you out.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct