Title: TTFB on files very slow
Last modified: February 24, 2020

---

# TTFB on files very slow

 *  [dafnie](https://wordpress.org/support/users/dafnie/)
 * (@dafnie)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/ttfb-on-files-very-slow/)
 * My page is very slow at loading images when enabling “Lock files”
 * When function is enabled TTFB is from 6 to 22 sek.
    When function is disabled
   TTBF is 0.2 to 0.9 sek.
 * – I have tried normal and fopen open mode. My host will not implement xsendfile
   on the server.
    – I have tried disabling all other plugins.
 * Wordpress: 5.3.2
    UAM: 2.1.12 PHP: 7.2
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fttfb-on-files-very-slow%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [torophal](https://wordpress.org/support/users/torophal/)
 * (@torophal)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/ttfb-on-files-very-slow/#post-12884882)
 * Hi,
 * I have the same issue and I’ve been trying to analyse the reason for my slow 
   site for quite a while.
    I’ve ocassionally found your question. Thanks for posting
   this! Did you solve the problem?
 * Greetings
 *  Thread Starter [dafnie](https://wordpress.org/support/users/dafnie/)
 * (@dafnie)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/ttfb-on-files-very-slow/#post-12907391)
 * Hi torophal
 * Yes i have solved the problem with slow TTFB on protected files.
 * But i have disabled the “Lock files” feature i UAM.
    I have read in other forums
   that the approach used in UAM to protect files is very memoryheavy if there is
   a lot of images on the page. On every filerequest the server have to call wordpress
   to see if the file is allowed to be loaded.
 * Instead I have moved the protected file to a seperate folder on the server and
   use an other plugin to do the job.
 * 1. Move files from /uploads to /uploads/members.
 * 2. Install the plugin [prevent-file-access](https://da.wordpress.org/plugins/prevent-file-access/)
 * 3. Enable protection and protect the members folder.
 * My TTFB on images is now the same as without file-protection.
 * The prevent-file-access plugin generate a simple setting in the .htaccess file
   and if you know a little programing it is not that hard to customize the .htaccess,
   if you have special needs.
 * Happy coding.. 🙂
 * Let me hear if it worked for you as well.

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

The topic ‘TTFB on files very slow’ is closed to new replies.

 * ![](https://ps.w.org/user-access-manager/assets/icon.svg?rev=1563783)
 * [User Access Manager](https://wordpress.org/plugins/user-access-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-access-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-access-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/user-access-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-access-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-access-manager/reviews/)

## Tags

 * [peformance](https://wordpress.org/support/topic-tag/peformance/)

 * 2 replies
 * 2 participants
 * Last reply from: [dafnie](https://wordpress.org/support/users/dafnie/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/ttfb-on-files-very-slow/#post-12907391)
 * Status: not resolved