Slow admin – waits and is blocked for a long time

I have a wordpress site and sometimes when logged in to the admin it can be quite slow. I’ve attached an image to show what i mean. The first request waits for about 8 seconds before anything else happens, a lot of the time that is about 2.5 to 3 seconds wait. Then all of the other requests get blocked for several seconds.

I do have quite a few plugins (26) could this be the reason or is it something else?

Read More

What’s actually going on here and what I can do to improve it as much as I can?

enter image description here

Update:
I’ve deactivated all of the plugins and activated them one by one. The two that seemed to have the biggest effect was Advanced Custom Fields and Use Google Libraries. Here’s what i found.

These are the requests and time to load the index dashboard page according to the net tab of firebug.

With no plugins activated
26 Requests
6-7 seconds

With all plugins activated
64 Requests
13 Seconds

With all plugins activated but the two mentioned above deactivated
36 Requests
8 Seconds

If i activate Advanced custom fields
55 Requests
11-12 Seconds

If i deactivate ACF and activate Use Google Libraries
53 Requests
10 Seconds

Related posts

Leave a Reply

2 comments

  1. In response to the op’s comment:

    Update: I’ve deactivated all of the plugins and activated them one by one. The two that seemed to have the biggest effect was Advanced Custom Fields and Use Google Libraries. Here’s what i found.

    The use of google api’s should save you time and effort, not cost you time and effort. You can load them in one of your theme files (ie functions.php) like so

    <?php  
    // first, check to see if jquery-ui is already loaded 
    if( !wp_script_is('jquery-ui') ) { 
            // you don't have to use googleapi's, but I think it helps. It saves the user's browser from loading the same script again if it has already been loade>
            wp_enqueue_script( 'jquery-ui' , 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js' );
    }   
    ?>  
    

    (note: I took part of this from another answer I submitted recently. The thread can be found here.

    As for the Advanced Custom Fields module, what are you using it for?

    Edit:

    1) make 100% sure you aren’t calling any of these libraries twice. It’s definitely possible that some other piece of code is calling it already and when you call it twice, it can cause issues. Using google api’s for jquery is probably going to be an issue if wordpress already uses jquery by default, for example (hint: it does!)

    Recently, I found that Quick cache was actually slowing!!! one of my client’s websites, which is now super important because google uses it to score you for SEO.

    To solve it I did the following:

    1) Switched over to W3 Total Cache but didn’t enable everything.
    2) every time I made a change, I ran it through a website speed testing service with a handful of other sites I have worked on as a control for each test.
    3) Instead of using googleapi’s, I set up an account with CloudFlare, which comes included as an option for W3 Total Cache. CloudFlare is a CDN service with a free service tier.

    The results:

    Enabling DB and file cache and a few other tweaks (like minifying) got this one particularly slow site down from the following:

    Test 1: using Quick Cache, this one site was taking 15.07 seconds to load! I disabled it, and it dropped to about 6-7 seconds on average.
    Test 2: Enabled W3 Total Cache without CloudFlare: page load time came down to 1.91 seconds. Still kinda gross, but what the hey it is shared hosting for this account.
    Test 3: Enabled CloudFlare to host images, media files, etc and my word does it fly now! Average page load is now down to .45 seconds.

    Final Note:

    These are just shared hosting methods. Upgrade to a VPS and set up an opcode cache like APC and you will bring that load time down even more (at least I would hope). Add a Varnish reverse proxy cache and your site will be able to maintain under heavier levels of traffic. Memcached is great, too, but Varnish just flies every time I implement it and the ability to use VCL is fantastic!

  2. What are you using for cacheing? Do you have multiple cache / performance / or even SEO plugins installed? If so, disable all of them and re-enable the most suspect ones one at a time.

    The best first step to take in a case like this no matter what is to disable ALL plugins and check to see if the problem still exists. If it does still exist, you likely have a server configuration problem, or a wordpress core problem. If the problem goes away, you are halfway there. Start re-enabling modules one by one and check to see if the results fix the problem.

    Running a large number of plugins will hit your performance on some level, but most plugins aren’t that heavy duty. If one of your plugins is causing an issue with WordPress, however, it could cause this very issue.

    If you are running cache plugins, are you using it for all of your pages? You might be causing an issue. None of the admin pages should ever be cached, really, since you should only have a limited number of users who have access to /wp-admin to begin with.