Thanks in advance for everything
I have a wordpress site which works well otherwise, except being slow. Caching enabled and unnecessary plugins removed. With caching, sometimes it loads in few second which is somewhat ok, but many times it takes a lot of time just for the first byte to show
There is no php code on my part, so it’s must be something with the WP core / plugin loading and stuff.
Using the P3 performance profiler for wordpress, it seems that plugins take around 2-3 seconds to load, but I’m not sure this is a complete indication
Any ideas? how can I test it without placing more code inside the wp core? Should I time the hooks of wordpress?
Are you on the cheapest available hostgator plan? If you’ve not got a VPS to reconfigure, it’s difficult to see what can be achieved.
I’d start with disabling everything until you get a reliable site, and then adding it back in until you find what is breaking it, and then investigate why.
Sorry to be so wooly, but a blank page isn’t much to go on!
Not good per se, but not awful as regards “perceived” load time.
There are definitely things to be done, however.
Some things that will help a great deal are:
1.) Combining and minifiying JavaScript and CSS files (Your page has 27 blocking script resources and 18 blocking CSS resources)
2.) Try to async or defer JavaScript
2.) Optimize and lazy load your images
3.) Implement DNS prefetching
4.) Use a more svelte social sharing means
5.) Conditionally load Disqus
As far as your Admin running slow, this is nearly always an issue with the host and/or server configuration issue.
what can I do about all these external js / css files? can I minify or get them minified somehow?[/quote]
After another look, you’re probably not going to be able to minify many of those .js files without something ‘breaking’. Combing them, however, should be relatively easy and will minimize HTTP connections resulting in a faster load. Combining and minifying your CSS should prove non-problematic, (but don’t quote me on that). It will take some experimentation and A/B testing on your behalf or on the behalf of whomever will be optimizing your property.
The easiest way would be to use W3TC: Performance → Minify → Help (the “Help Wizard” at the top of the page). This function will show you all of the URIs W3TC detects as available for minification and combination. This function also allows you to choose where the combined .js file(s) will be placed, i.e. , , or . Should dependency issue arise, you can also drag-and-drop .js and CSS files into any order within the combined file(s) that you need.
Lazy load. This particular plugin is tiny (~2kb) and is not jQuery dependent, which is likely what you need. Install and done.
Even though Disqus’ JavaScript is delivered asynchronously, it (almost always and nonetheless) monkeys with a users ability to immediately interact with the page upon which it is loaded.
I’m using W3TC for quite some time now.
Installed Lazy Load (different one though, I’ll try some)
and thanks for the Disqus advice
I just thought there might be some plugin that could monitor all hooks@plugin/theme-file and see what consumes the time. Could give some information. No?
[quote=“junky, post:6, topic:8951”]I just thought there might be some plugin that could monitor all hooks@plugin/theme-file and see what consumes the time. Could give some information. No?
[/quote]
The easiest way to test your plugins is to disable them, then re-enable them one-by-one and test in between. The P3 (Plugin Performance Profiler) plugin is not going to give you accurate or consistent results and wouldn’t even if your site were optimized for performance/speed.
All that said, the commitment to the idea that a plugin or plugins may be the root cause of your site’s performance issues is to look at WordPress optimization in an incorrect manner (for the most), especially since optimizing your plugins’ JavaScript and CSS (i.e. combining files/minifying and caching) will yield entirely different test and real-world, end-user results. Further, I see no evidence that plugins are your site’s problems.
What is absolutely certain, however, is that there are several things having to do with basic optimization that are not being implemented; that, if implemented, absolutely will shave seconds off of your site’s load time.
The best place for you to start is with the 27 blocking script resources and 18 blocking CSS resources, the other recommendations made in this thread, and the report that has been linked to herein. Get those squared away and your site will be much, much faster for its users.
As an aside, I am unable to replicate the whacky load times indicated in your initial post.
What is it you’ve asynced? I’m not seeing anything different in your source and the scripts are still blocking…
If getting those asynced/deferred via W3TC is proving difficult/problematic, another thing you could try is signing up for CloudFlare and implementing Rocket Loader.
^In “Automatic” mode, this will async and combine all your scripts (including those inline) thereby making the site more performant, but will not provide the SEO benefits that the standard HTML5 attributes W3TC employs will. Reason being that Google bot does not recognize CloudFlare’s proprietary attribute as one that renders scripts as non-blocking, even though it in fact does for the end-user.