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

About Me:

Szabi Kisded

Hey there, I'm Szabi. At 30 years old, I quit my IT job and started my own business and became a full time WordPress plugin developer, blogger and stay-at-home dad. Here I'm documenting my journey earning an online (semi)passive income. Read more

Sign up for my newsletter and get the YouTube Caption Scraper WordPress plugin for free
(worth 29$)!

All My Plugins In A Bundle:

My AutoBlogging Plugins:

My Online Courses:

A Theme I Recommend:

Featured Posts:

To Top