4

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?

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

4
  • This is a user support question. The defined scope of WPSE generally includes WordPress development. You should try the WordPress.org support forum instead. Jan 24, 2012 at 16:38
  • @ChipBennett Downvote is for "asked a badly written Q". Close flag imho is enough. :)
    – kaiser
    Jan 24, 2012 at 16:49
  • @kaiser fair enough. I reversed the downvote. :) Jan 24, 2012 at 17:08
  • Edit Or, I tried to reverse my downvote. If the question is edited, I'll be able to reverse. Jan 24, 2012 at 17:14

2 Answers 2

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!

3
  • Is that code to use instead of Google Libraries? I know it's supposed to save times and maybe it does for viewing the website, but it seems to slow down the admin. The advanced custom fields is used for custom fields on my custom post type. For example file fields and such to use on my custom post type. I forgot to mention from your first answer, i'm using WP Super Cache but it doesn't cache for known users so it doesn't cache the admin pages.
    – Corbula
    Jan 24, 2012 at 21:16
  • yes the code would be a replacement for google libraries. The point is, you typically use google libraries to save your users from the need to download jquery (or whatever library) if they have loaded it via google api's already. It's not something you need to have. It's a performance enhancement, and if it's slowing down your site, it's not enhancing anything, so you should consider shutting it off for that reason.
    – amatusko
    Jan 24, 2012 at 22:11
  • Thanks, it seems i'm not the only person having problems with Advanced Custom Fields. There's not really anything else i can do i think.
    – Corbula
    Jan 30, 2012 at 11:27
1

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.

1
  • I've tried deactivating all the plugins and activating them one at a time. I've updated the question.
    – Corbula
    Jan 24, 2012 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.