If you are experiencing a slow WordPress, or these statements seem familiar to you or your customers, then you are not the first, and guaranteed not to be the last person to feel that your WordPress just isn’t up to the task of being fast. There is a reason for this, and I will henceforth call it the WordPress exponent:
Website slowness = WPWP
What this means is basically: The bigger your WP, the faster your website will become slower.
The definition of a “Big WP” has nothing to do with the amount of posts or traffic. A website with 1 million posts, 1 million images and millions of visitors is not necessarily considered a “Big WP”. All that is counteracted with a proper server setup, proper caching and a decent theme.
The size of your WP increases with the amount of work the server has to do whenever WordPress loads up, and this is one of the biggest weaknesses of WordPress: The server load racks up pretty fast.
Typical sources that increase the size of your WP include, but are not limited to:
The way these result in a large workload for the server requires an explanation of how wordpress works.
Imagine sitting in your control panel, your are editing your latest blogpost (newsarticle, page, whatever..). You decide to fix a simple typo in your title, and proceed to fix it and click the nice big blue “Update”-button. You have now done your part, and WordPress takes over to perform your desired action: changing the title of your post. Should be fairly simple to swap a few letters in this modern age of computers, right?
Success!
This list is a bit extensive, but pay attention to #8, #9 and #10. This is necessary information to explain a slow WordPress.
And that is just scratching the surface
Ok:
“Inefficient”
Claim: “WordPress has existed for a long time and learnt a lot about how to verify everything properly, of course there will be a lot going on for even a simple operation!”
True, and WordPress does probably perform many good sanitations, normalizations and security-related stuff. The size of this code is not the main problem. This is not the focus of the size of your WP.
WordPress loads all your plugins when you save your title. It also loads all plugins every time someone visits your frontpage (except if cached properly), and every time you click “edit” on your post. In fact, every request to WordPress will result in all plugins being loaded fully, and their code will be run.
The more plugins you have, the more code will be loaded fully and run on every single request made to WordPress, that includes showing a page, doing an ajax-request (wp-ajax.php), saving your post, anything and everything!
Your theme is loaded when you want to save your title. Just as with plugins, your themes functions.php is loaded fully on every single request made to the WordPress.
Why on earth would you need your theme files to put your new title in the database? It’s not going to be shown during the “save the title” request, and theme files are ment to show your content!
WordPress seems to not care about this. This “concept” of a problem is present throughout the entire WordPress architecture.
Remember this?
#10: WordPress triggers its more important actions, like after_setup_theme, init, and wp_loaded
During #8, and possibly #9, all those plugins are loading their files and running… They are hooking up their actions to “init”, “wp_loaded”… They are preparing all sorts of filters and registering post types, adding custom fields, clearing transients, sending emails, running wp-cron.php etc.
Every plugin adds more work for the server when it needs to be loaded, and in the process adds a WHOLE LOT of later work for the server when WordPress starts triggering the huge queue of actions at the end of the load.
Plugins are also able to run their own actions, or even rerun wordpresses own actions. They are quite creative and will spare no cpu-cycle to make sure their work is done.
Plugins may also add filters to parts of actions, which means that each plugin added may actually increase the amount of work all other plugins have to do before reaching the end.
Say you have 20 plugins in your WordPress. If 1 of those plugins add 1 ms extra loading to all the other 20 plugins you have through some filter or action, that just means 20ms extra load time. No problem.
But:
If all 20 plugins add 1ms extra load to the other 20 plugins, that’s suddenly 400ms extra load! That’s nearly half a second extra, and is not uncommon. This is one common problem in your slow WordPress.
Then you add one more plugin that accidentally 1ms to all the other plugins, and now you have 441ms extra load.
What if one of those plugins accidentally more than 1 ms to the other plugins? The number starts racking up very fast.
This potential problem is present in every single request made to wordpress, in all situations and all locations, on all WordPress installations, no matter the hosts claims about “our wordpress are faster”.
No you don’t. Stop hoarding plugins and get a proper theme. Install WP fastest cache and keep it active. By simply using common sense, your slow WordPress might speed up significantly!
It is also possible that a pagebuilder is single-handedly slowing down your WordPress. Read more about it in : Pagebuilders, and why you should avoid them