Connect with us

[WordPress] You don’t have permission to attach files to this post


[WordPress] You don’t have permission to attach files to this post

I got this error message when WordPress user try to upload document using Add Media option.

“You don’t have permission to attach files to this post”

I searched about this issue and found few solutions. Sharing all of them with you so try all, you might get one working for you. 🙂

Solution #1
User role given to user might be corrupted. If you are aware with any Role editing plugin, install it and assign below role to user. User need edit_post role along with below options.


Solution #2
If you are developer and have access to PHP files, you can add below code in functions.php file. It will give the role of the author the ability to upload files.

$user_role = ‘author’; // Change user role here
$contributor = get_role($user_role);

Solution #3
Hopefully either of above 2 will work for you. If none of them works, try this one. Try to add the full file path for the uploads directory under Settings > Media.

If neither of above works for you and you found fix from somewhere else, please do not forget to share with me via comment. I will add it here and it might help someone else like you.

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

More in coding

Sign up for our newsletter and get a free affiliate e-book!

About Me:

Szabi Kisded

Hi, my name is Szabi and I'm documenting my journey selling plugins on CodeCanyon. I will show you every step of it: learning to code, plugin ideas, WordPress stuff and more. Read more…

Mega Plugin Bundle:

CodeCanyon Portfolio:

Learn to Code Plugins:

Latest Promotions:

Recommended Theme:

Start Your Own Blog:

Popular Posts:

Latest Posts:

To Top
Grab the largest plugin bundle from CodeCanyon!