Title: Admin slow when plugin activated
Last modified: August 22, 2016

---

# Admin slow when plugin activated

 *  Resolved [ComonSoft](https://wordpress.org/support/users/comonsoft/)
 * (@comonsoft)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/)
 * Hi,
 * after migrate a site from dev to production, the WP admin is dramaticaly slow.
   If I deactivate your plugin, it works normaly and fast, any idea for this issue?
 * We use the lastest version of your plugin with Thine forest Theme.
 * Thx in advance
    John
 * [https://wordpress.org/plugins/option-tree/](https://wordpress.org/plugins/option-tree/)

Viewing 15 replies - 1 through 15 (of 23 total)

1 [2](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/page/2/?output_format=md)

 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498523)
 * The entire admin or just the OptionTree pages? And you are certain you are using
   2.4.5?
 *  Thread Starter [ComonSoft](https://wordpress.org/support/users/comonsoft/)
 * (@comonsoft)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498524)
 * Yes whe use the latest version 2.4.5
 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498525)
 * And which parts of the admin are slow?
 *  Thread Starter [ComonSoft](https://wordpress.org/support/users/comonsoft/)
 * (@comonsoft)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498527)
 * Every parts of the admin are dramaticaly slow 45s for dashboard, 5 minutes for
   a complexe page with composer. If I deactive your plugin dashboard 0,7s complexe
   page 2s. Strange isn’t it ?
 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498529)
 * It is strange that it effects the entire admin panel since OptionTree should 
   not be loading on those pages at all. Please install the Query Monitor and/or
   Debug Bar plugins and see if there are any obvious issues that pop out at you.
 * Also, how many Theme Options do you have in your theme?
 *  Thread Starter [ComonSoft](https://wordpress.org/support/users/comonsoft/)
 * (@comonsoft)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498534)
 * We have following settings in Theme options
    General Display Tagline? ON Enable
   Lightbox for WordPress Gallery? ON Enable Page Comment? OFF Blog Override Post
   Meta Info? OFF Footer Display Footer Widget Area? ON Footer Widget Area Columns
   4 columns WPML Display WPML Language Selector? OFF Reveolution Slider ON
 * I try to check with Query Monitor and/or Debug Bar plugins
 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498535)
 * That doesn’t seem like enough options to make the admin slow down anyhow. I may
   need to get access to your site to see what’s going on for myself. Please install
   those plugins and send me login info, if you can, to derek at valendesigns dot
   com.
 *  Thread Starter [ComonSoft](https://wordpress.org/support/users/comonsoft/)
 * (@comonsoft)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498540)
 * Query monitor report
 *     ```
       Page generation time	Peak memory usage	Database query time	Database queries
       38,7391
       12,9% of 300s limit	161 722 kB
       61,7% of 262 144 kB limit	32,9474	SELECT: 23 951
       SHOW: 6
       INSERT: 1
       UPDATE: 2
   
       Slow queries
       Slow Database Queries (above 0,05s)
       Query	Caller	Component	Affected Rows	Time
       SELECT post_name
       FROM wp_posts
       WHERE post_name = 'media-4647'
       AND post_type = 'option-tree'
       AND ID != 0
       LIMIT 1	wp_unique_post_slug()+	Plugin: option-tree	1	0,0696
       INSERT INTO <code>wp_posts</code> (<code>post_author</code>,<code>post_date</code>,<code>post_date_gmt</code>,<code>post_content</code>,<code>post_content_filtered</code>,<code>post_title</code>,<code>post_excerpt</code>,<code>post_status</code>,<code>post_type</code>,<code>comment_status</code>,<code>ping_status</code>,<code>post_password</code>,<code>post_name</code>,<code>to_ping</code>,<code>pinged</code>,<code>post_modified</code>,<code>post_modified_gmt</code>,<code>post_parent</code>,<code>menu_order</code>,<code>post_mime_type</code>,<code>guid</code>)
       VALUES (1,'2014-11-20 03:29:52','2014-11-20 02:29:52','','','Media','','private','option-tree','closed','closed','','media-23899','','','2014-11-20 03:29:52','2014-11-20 02:29:52',0,0,'','')	wp_insert_post()+	Plugin: option-tree	1	0,0607
       SELECT post_id, meta_key, meta_value
       FROM wp_postmeta
       WHERE post_id IN (49,51,44,46,38)
       ORDER BY meta_id ASC	update_meta_cache()+	Plugin: uxbarn-team	59	0,0568
       ```
   
 * After we have incredible number of queries from your plugin **more than 23000
   queries **??
    Like this one :
 *     ```
       23851	SELECT post_name
       FROM wp_posts
       WHERE post_name = 'media-23819'
       AND post_type = 'option-tree'
       AND ID != 0
       LIMIT 1	wp_unique_post_slug()+	Plugin: option-tree	1	0,0013
       ```
   
 * Incredible !
 *  Thread Starter [ComonSoft](https://wordpress.org/support/users/comonsoft/)
 * (@comonsoft)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498543)
 * We have 24837 records in wp_posts table ?!
 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498565)
 * The issue was fixed in the latest release. However, it seems that I need to write
   a clean up script in a new hotfix to address all the records that were created
   by the change in 2.4.3 and remove them permanently. I’ll work on a fix for this.
   However, I need a database dump of an site that is experiencing the issue so 
   I can properly solve it. Is there any way you could email me an SQL dump of your
   database?
 *  Thread Starter [ComonSoft](https://wordpress.org/support/users/comonsoft/)
 * (@comonsoft)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498583)
 * Hum,
 * hope you can fix it quickly !
 * Dump is here: [http://www.jcbsignalisation.com/jcb.sql.zip](http://www.jcbsignalisation.com/jcb.sql.zip)
 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498586)
 * I’ve downloaded it, you can delete it now. I’ll try and have a fix by tomorrow.
 * Cheers,
    Derek
 *  Thread Starter [ComonSoft](https://wordpress.org/support/users/comonsoft/)
 * (@comonsoft)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498587)
 * Thank you Derek
    John
 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498617)
 * Please test hotfix version 2.4.6 of OptionTree before I release it today. I’ve
   tested that it works on my system with the DB dump, but would like someone to
   confirm it’s working well on their server and give any feedback before I release
   it into the wild.
 * [https://github.com/valendesigns/option-tree/archive/hotfix-2.4.6.zip](https://github.com/valendesigns/option-tree/archive/hotfix-2.4.6.zip)
 *  Thread Starter [ComonSoft](https://wordpress.org/support/users/comonsoft/)
 * (@comonsoft)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/#post-5498619)
 * Derek,
 * does it include a script to purge database ?

Viewing 15 replies - 1 through 15 (of 23 total)

1 [2](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/page/2/?output_format=md)

The topic ‘Admin slow when plugin activated’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/option-tree_363534.svg)
 * [OptionTree](https://wordpress.org/plugins/option-tree/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/option-tree/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/option-tree/)
 * [Active Topics](https://wordpress.org/support/plugin/option-tree/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/option-tree/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/option-tree/reviews/)

## Tags

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

 * 23 replies
 * 3 participants
 * Last reply from: [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/admin-slow-when-plugin-activated/page/2/#post-5498697)
 * Status: resolved