Slow admin – waits and is blocked for a long time

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!

Leave a Comment