Title: Using WordPress Authentication
Last modified: August 18, 2016

---

# Using WordPress Authentication

 *  [the_dead_one](https://wordpress.org/support/users/the_dead_one/)
 * (@the_dead_one)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/using-wordpress-authentication/)
 * Is it possible to use WordPress Authentication on file downloads?
 * What I mean is that I’ve created a site with the View Level plugins so some of
   the posts are not avaliable unless your registered and have level 1.
 * But I have some files that users may wish to download and I want to have the 
   same restriction on downloading the files (i.e. only registered users with user
   level at least 1).
 * Is there a way to do this?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/using-wordpress-authentication/#post-185599)
 * Strangely enough, I’m wrangling with a plugin idea for downloads. Wouldn’t be
   difficult to slip user (and user level) checking into it as an option.
 * The way it works is, you create a specific download directory for files and set
   a variable in the plugin to point to that directory. To download files, you’d
   use the ‘dl’ query with a filename as value:
 * index.php?dl=thisismystuff.zip
 * The plugin’s still a few days off from being release-worthy, but let me know 
   if this fits your needs.
 *  Thread Starter [the_dead_one](https://wordpress.org/support/users/the_dead_one/)
 * (@the_dead_one)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/using-wordpress-authentication/#post-185853)
 * I had started to think about how you could do it as a plugin too. Sounds like
   you have it mostly figured out and it seems to be exactly what I ‘m looking for!
 * Keep me informed! Thanks. 🙂
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years ago](https://wordpress.org/support/topic/using-wordpress-authentication/#post-186121)
 * Notice of plugin here:
 * [http://wordpress.org/support/topic/32243](http://wordpress.org/support/topic/32243)
 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [21 years ago](https://wordpress.org/support/topic/using-wordpress-authentication/#post-186122)
 * You could just include `wp-config.php` and check for `$current_user` to see if
   they’re signed in.
 *  [chrisdawson](https://wordpress.org/support/users/chrisdawson/)
 * (@chrisdawson)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/using-wordpress-authentication/#post-186227)
 * Thanks matt. Note that if the page you need to authenticate is somewhere on your
   site other than under the WordPress root directory, you need to change the COOKIEPATH
   definition in wp-settings.php so that the auth cookie applies there as well.
 * I found that
 * `define('COOKIEPATH', '/');`
 * did the trick!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Using WordPress Authentication’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 4 participants
 * Last reply from: [chrisdawson](https://wordpress.org/support/users/chrisdawson/)
 * Last activity: [19 years, 6 months ago](https://wordpress.org/support/topic/using-wordpress-authentication/#post-186227)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
