How to Allow Contributor to Upload Images in WordPress Without Using Plugin

Hello guys, If you created the “contributor” user role in your WordPress blog, and your writer needs to upload images too but they can’t, Because the WordPress contributor user role lacks the permission to upload images, there are a few plugins that can let you change role permissions, but here in this WordPress Tutorial, we are going to share a simple step to give contributors permission to upload images without a plugin.

WordPress Tutorial to Allow Contributors Upload Images

One minor change in the theme’s functions file is sufficient to give WordPress contributors the permission to upload and insert images without using any plugin.

1: First login to your cPanel and go to File Manager. And access your domain files.

- Advertisement -
Allow Contributors Upload Images

2: Next you go to wp-content>Themes>your-themes>functions.php. and add bellow code in bottom of functions.php file.

if ( current_user_can('contributor') && !current_user_can('upload_files') )
	add_action('admin_init', 'wif_allow_contributor_uploads');

function wif_allow_contributor_uploads() {
	$contributor = get_role('contributor');
	$contributor->add_cap('upload_files');
}
WordPress Tutorial to Allow Contributors Upload Images

Thats it, now contributor has access to media library and upload permission.

Related articles

How to Create QR-Based Clickable Digital Business Card

Have you ever wondered about how to create your...

WP Super Cache Plugin Advance Settings & Configuration 2024 Guide

You know every WordPress site need a cache plugin...

20+ Essential WordPress Plugins for Bloggers (Updated List)

WordPress is a very popular blogging platform because of...

E-Commerce App Development For Beginners: Things to Know Before Starting

With the advent of technology, everything is changing, even...

Best Selling Products

Sale!

15000+ ChatGPT Prompts to Boost Your Business

Original price was: $37.50.Current price is: $1.49.
Sale!

900GB+ Premium Graphics Assets Bundle- All Editable Files

Original price was: $1,260.00.Current price is: $14.85.
Sale!

CorelDRAW 2024- Vector Illustration & Graphic Design Software

Original price was: $810.00.Current price is: $13.49.
Sale!

35000+ Festival & Business PNG Images Biggest Bundle

Original price was: $435.00.Current price is: $45.00.
Abhay Pratap Singh
Abhay Pratap Singhhttps://www.itechcube.com
Abhay Pratap Singh is Digital Entrepreneur, Who is Making Money From the Internet since 2012. He Also Works as a Freelancer and Does Web and Mobile app Development. Apart from That, He Invests in Stock Market and Crypto Currencies. Here in iTechCube, Writes about Blogging, WordPress Guides, and Tutorials to help begginers.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Select your currency
USD United States (US) dollar