How to fix wordpress error: Sorry, you do not have permission to upload files.

Author :

React :

Comment

The Mistake «Sorry, you do not have permission to upload files.» comes from user role assigned on your website.

By default, the role Contributor does not have permission upload_files, which prevents any images or media from being added.

Good news : You can fix this in a few minutes with 2 methods, from the simplest to the most advanced.

Contact the site administrator

The quickest solution is to contact the’administrator on your site. Only he can change your role from the dashboardin Users > All Users.

All they have to do is open your profile and change your role to Contributor at Author Where Editor. These two roles have the permission to send files by default. Clicking on Update and the problem is solved.

If he'd rather keep you as Contributor for reasons of security, they will need to add the permission manually using an extension. That is the subject of the following section.

Install the User Role Editor extension

If you want to keep a custom role while allowing files to be uploaded, the extension User Role Editor is the ideal solution. It allows you to modify the permissions for each role directly from the dashboard, without changing the waiter nor in the code.

Here are the steps to fix the error:

  1. Go to Extensions > Add, search User Role Editor, install it, and then click Enable.
  2. Go to Users > User Role Editor (The submenu remains in English, even on a French-language website.).
  3. Select the role Select the appropriate option from the drop-down list. Be sure to check which one has been assigned to the person.
  4. In the list All, ask for permission upload_files and check the box.
  5. Click on Update to apply the change.

Watch out for the confirmation button : the buttons Yes and Nope are sometimes reversed in the window that appears. Read the message carefully before clicking so you don't accidentally undo your change.

Once the permission has been added, the user can upload files again, and the error message disappears.

A safety tip : Do not grant this permission to just anyone. A malicious file uploaded from a compromised account could cause damage to your site. Reserve this permission for trusted accounts.

Step-by-Step Guide with User Role Editor

To see how this works, here is the complete step-by-step process in screenshots.

  • Once the plugin is installed, open the menu Users then click on User Role Editor in the dashboard. The entry remains in English even in the French interface.
"User Role Editor" menu in the WordPress dashboard
"User Role Editor" menu in the WordPress dashboard ©Antonin for Alucare.fr
  • In the drop-down list at the top, Select the role affected by the problem, most often Contributor.
Selecting the user role to edit in User Role Editor
Selecting the user role to edit in User Role Editor ©Antonin for Alucare.fr
  • Next, find the line upload_files in the permissions column, then check the box corresponding. It is this feature that allows users to upload images and media to the site.
Check the "upload_files" box to fix the WordPress permission error
Check the "upload_files" box to fix the WordPress permission error ©Antonin for Alucare.fr
  • Finally, click on Update to save the change.
"Update" button to save the permission in User Role Editor
"Update" button to save the permission in User Role Editor ©Antonin for Alucare.fr
👍Your opinion
The article is informative
The article is objective
The article answers my question
Content up to date
🔍 Found any errors? Tell us where!

Found this helpful? Share it with a friend!

This content is originally in French (See the editor just below.). It has been translated and proofread in various languages using Deepl and/or the Google Translate API to offer help in as many countries as possible. This translation costs us several thousand euros a month. If it's not 100% perfect, please leave a comment for us to fix. If you're interested in proofreading and improving the quality of translated articles, don't hesitate to send us an e-mail via the contact form!
We appreciate your feedback to improve our content. If you would like to suggest improvements, please use our contact form or leave a comment below. Your feedback always help us to improve the quality of our website Alucare.fr


Alucare is an free independent media. Support us by adding us to your Google News favorites:

Post a comment on the discussion forum