Help! Pages on my website are taking 20+ seconds to load
- Your website is normally very fast to load, but suddenly or recently it takes 20+ seconds to load a single page (which could result in an error at the end, or the page loading normally).
- Your website is loading slowly.
- WordPress is slow.
- Your web host is under heavy load. If this is true, then simply wait it out for 10-30 minutes and check the results again later.
- You're using an old version of PHP
- Some unknown resource on your website is loading for as long as the PHP process is allowed to live, then failing either silently or with an error
The first issue is pretty common and should be expected (to a certain degree) under shared web hosting environments. If you have a dedicated server, I'd suggest getting in touch with whomever is manging your server to find out why there is/was a temporary slowdown.
The second issue can be remedied pretty easily within Plesk; see our guide here to changing the PHP version.
The third issue needs a bit of sleuthing. There's two ways to go about finding the source of this problem: exhaustive and a specific search. You may find that the specific search fails, in which case you'll have to fall back to exhaustive.
Specific Search Problem Solving with WordPress
This is a tad more difficult, but often when there are issues with a plugin or theme, after the page finally loads, you can inspect the page for glitches or missing elements. For example if the problem is with a Twitter widget, you might find that the Twitter widget never loads on the page like it should. Then you can go specifically to that plugin and disable it to solve the problem without having to scan through each of your plugins one-by-one.
If you are unable to spot any glitches, you'll have to fall back to the exhaustive search option below.
Exhaustive Search Problem Solving with WordPress
To troubleshoot this exhaustively (and you'll soon realize why it's called that), simply disable each plugin that's active on your site one-by-one until the site begins loading normally again. The last plugin to be disabled will be the source of the problem. You can then re-enable all other plugins and request help from the plugin developer.
If you are unable to access the WordPress admin area, you can disable the plugin by renaming its folder using the Plesk File Manager.
You may also find you need to activate another theme, even if just temporarily, to figure out if the theme code is to blame. If changing themes fixes the problem, then you should request help from the theme developer.
Why did my plugin or theme behave this way?
There's usually only two causes:
- Some updated code in the plugin or theme causes a spinlock -- basically a loop in the code where it's endlessly processing and never coming up with a result.
- Something in the plugin is trying to access resources that are blocked or unavailable and doesn't have a sane timeout value set (such as 5 seconds max load time). Examples:
- The software is trying to open a port that is blocked. This occurs when trying to communicate with a payment processor or other third party service.
- The software is trying to communicate with a server that is unavailable. This has occurred in the past when services that are expected to always be operational are down, like when Twitter goes offline for a few hours and your site is attempting to load your Twitter feed.
- 0 Users Found This Useful