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

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

10 Best Magazine WordPress Themes for Your Blog & News Site

If you are looking for a fantastic theme for...

Download e-PAN Card Easily- Follow These Simple Steps

The permanent account number or PAN card is required...

Fixed: No input file specified Error in Codeigniter

Hello guys, Today I'm working on a Codeigniter project...
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