I've installed WordPress for my schools website.

I need create a file archive, an uploader and a file viewer for the website. The file archive would store files on the server. The uploader would enable users to upload files and tag them. The file viewer would allow users to view and download files using their tags.

Both the uploader and the viewer would have to be integrated into the page. I'm looking for a way to display the viewer results in the admin panel but it would have to be intuitive and easy to use.

All registered users of the site should be able to view and download the files. And only the ones with a specific file upload privilege should be able to upload them.

I'm not sure whether what I want can be accomplished with the built-in media archive. I don't only want to upload media - but other file types such as documents, programs, etc.

Is there way to enable registered users to upload files without using the admin panel, but just the site itself?

All the download links to the files have to be included automatically in the Downloads page too. Some form of a file manager would also be great.

1 Answer 1


These are actually two questions. The second question – how to add categories to attachments – is already answered.

How to restrict uploading attachment to a specific role?

The capability to do that is named upload_files in WordPress. Some roles have this capability by default: authors, editors, administrators.

I would restrict it to editors and administrators. You can use a run-once plugin for that:

/* Plugin Name: Change Roles */

add_action( 'admin_notices', 't5_change_roles', 0 );

// Fires on the plugin activation screen just once.
function t5_change_roles()
    global $wp_roles;

    if ( ! isset( $wp_roles ) )
        $wp_roles = new WP_Roles;

    $existing_roles = get_editable_roles();

    foreach ( $existing_roles as $name => $role )
        if ( 'administrator' === $name )

        if ( 'editor' === $name )

        $wp_roles->remove_cap( $name, 'upload_files' );

    // Suppress "Plugin activated" notice.
    unset( $_GET['activate'] );

    print '<div class="updated"><p>Roles are updated, plugin deactivated.</p></div>';

But you can also use a plugin like Members and edit the roles per user interface:

enter image description here

  • Hi, thanks for your answer, but please see the updated question.
    – jcora
    Commented May 2, 2013 at 18:11
  • @Yannbane Sorry, plugin/theme recommendations are off topic here. Please never change the meaning of a question after there are answers.
    – fuxia
    Commented May 2, 2013 at 18:13
  • I'm sorry, it's not that I've tried to change the meaning, it's just that I've had trouble actually articulating the question originally. But yeah, I realize what you're saying, sorry again.
    – jcora
    Commented May 2, 2013 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.