Title: 20k posts &#8211; Unusable
Last modified: July 17, 2017

---

# 20k posts – Unusable

 *  Resolved [Bruno Rodrigues](https://wordpress.org/support/users/brunojti/)
 * (@brunojti)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/20k-posts-unusable/)
 * AAM is causing a huge slow down in my website.
    It has 20-25k items and when 
   I try to access the CPT page in admin panel, PHP’s timeout occurs. (In my production
   environment: 1cpu, 512ram, digital ocean).
 * In my local environment (vagrant with 4cpus, 2gb ram) using the same DB, the 
   same page takes 27seconds to load.
 * If I disable AAM in:
    * Local env: load time drops to 2-3 secs * Production env:
   page loads in 5secs.
 * From `debug.log` in production:
    [17-Jul-2017 20:41:53 UTC] PHP Fatal error: 
   Maximum execution time of 30 seconds exceeded in /var/www/xxxxxxxxxxx/wp-content/
   plugins/advanced-access-manager/Application/Core/API.php on line 379
 * Thanks for this amazing plugin!!!
    -  This topic was modified 8 years, 9 months ago by [Bruno Rodrigues](https://wordpress.org/support/users/brunojti/).
    -  This topic was modified 8 years, 9 months ago by [Bruno Rodrigues](https://wordpress.org/support/users/brunojti/).

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

 *  Plugin Author [AAM Plugin](https://wordpress.org/support/users/vasyltech/)
 * (@vasyltech)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/20k-posts-unusable/#post-9331311)
 * Hi [@brunojti](https://wordpress.org/support/users/brunojti/),
 * Thank you for the feedback. It is possible as AAM adds additional overlay on 
   top of the data processing to check if requested content is allowed or not.
 * There are few things that you can do to optimize your site.
 * First, if you are not restricting access to your backend or frontend sides, then
   you can turn off those features on the Utilities tab. This will improve your 
   site speed.
 * Second option is to turn off “Check post visibility” option if you are not using
   LIST option to hide any post, page or custom post type. This is the most resource
   consuming procedure as it triggers check for each fetched by WordPress core post.
   For more information about this please refer to this article [https://aamplugin.com/help/how-does-aam-inherits-access-settings](https://aamplugin.com/help/how-does-aam-inherits-access-settings).
   After reading this article you might realize how much work is happening behind
   the scene, especially if you have a lot of hierarchical taxonomies.
 * Finally if you are using LIST option, you can reduce the default number of posts
   that AAM is trying to cache per request (which is 500 by default). For that purpose,
   go to Extensions and install ConfigPress extension from the Free section. Then
   go to the ConfigPress tab and enter next configuration:
 *     ```
       [aam]
       get_post_limit = 20
       ```
   
 * This will tell AAM to process only 20 posts per request and it might significantly
   improve your website performance.
 * Keep me updated.
    Thank you, Vasyl
 *  Thread Starter [Bruno Rodrigues](https://wordpress.org/support/users/brunojti/)
 * (@brunojti)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/20k-posts-unusable/#post-9334106)
 * How can I turn off “Check post visibility”?
 * Digging around your code, I noticed that there is a block (if) @ Filter.php:61.
   
   But I could not find an option to disable it. P.S. When I comment the conditional
   mentioned above my load time drops significantly.
 *  Plugin Author [AAM Plugin](https://wordpress.org/support/users/vasyltech/)
 * (@vasyltech)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/20k-posts-unusable/#post-9334848)
 * [@brunojti](https://wordpress.org/support/users/brunojti/),
 * You can turn off the “Check post visibility” on the Utilities tab.
 * Thank you,
    Vasyl

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

The topic ‘20k posts – Unusable’ is closed to new replies.

 * ![](https://ps.w.org/advanced-access-manager/assets/icon-256x256.png?rev=3447421)
 * [Advanced Access Manager – Access Governance for WordPress](https://wordpress.org/plugins/advanced-access-manager/)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-access-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-access-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-access-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-access-manager/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [AAM Plugin](https://wordpress.org/support/users/vasyltech/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/20k-posts-unusable/#post-9334848)
 * Status: resolved