Remove the upload buttons for author and other wordpress user

If you want to restrict the normal author to upload media file your wordpress blog. So you can use the following code in your functions.php file.

Following function will remove the upload media button from wordpress dashboard.

//remove the upload buttons for auther and other wordpress user
function removemediabuttons()
if($user->wp_user_level >= 1) {
remove_action( 'media_buttons', 'media_buttons' );


Following code will remove the media library tab from the Add new post section for all the users.
Restricts media library access (subscriber) under the “add new post”

function remove_medialibrary_tab($tabs) {
return $tabs;

This hack is very important for wordpress developers. when you are developing the multiuser wordpress site.

You may like following Articles!

  • Terry Paris

    Awsome info and straight to the point. I am not sure if this is in fact the best place to ask but do you guys have any thoughts on where to employ some professional writers? Thank you :)

  • Arnita Coste

    You made some fine points there. I did a search on the subject matter and found most folks will agree with your blog.

  • john

    In my theme folder (wp-content/themes/buzznews) there is a functions.php file do I put it in there? Where exactly in that file?