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.
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:
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.