Even though this is 9 months or so old, probably worth making a few quick points.
Firstly, slow TTFB with WordPress is mostly due to a combination of:
- Slow-ish server
- Slow theme
- Too many (or slow) plugins
The fixes, as mostly listed above are:
- Tuning plugins as much as you can - by uninstalling, or through settings
- Tune theme, if possible at all
- Upgrade to faster hosting
Breaking these down in a little more detail:
1. Tuning Plugins
There are a few plugins that assist with performance tuning. For instance, if it looks like the cause might be slow SQL, there are several plugins that provide EXPLAIN data, such as “Query Monitor”. Install and look for slow queries. If you have access to set up slow query logging with MySQL, also do that. MySQL tuning is a topic in itself, though the most usual causes are lack of indexes or queries which “break” indexing by using the wrong sort of expression in WHERE clauses.
Also, be aware that some plugins execute their code on all pages, regardless; definitely worth checking for. (This is a no-no). There are plugins out there that will assist by switching off this behaviour and you could contact the author/s and nicely beat them around the head until they fix their plugin - it should execute as little as possible on unrelated page and admin hits.
An often used and raved about plugin tuner is P3 Plugin Performance Profiler; I haven’t yet tried it but have heard good things.
2. Tuning theme
Unfortunately this can be harder. The best fix is to switch to a well maintained theme system - if you want something robust and simple Genesis is popular, and also Oxygen is getting more popular these days. If you have heavy performance problems with a theme, it suggests that security and other problems may be coming down the line. If your site is commercial, you’re probably best paying a small amount of money for a commercial theme. Look for large user numbers as that means it will stay supported into the (more) distant future - a common problem is that the authors have moved onto other things in 2-3 years, just when you’ve become reliant on their theme! You want the ability to receive security updates promptly when problems occur, so some care in selecting vendors will help you in the long term.
3. Hosting problems
Firstly, nearly all WordPress websites will benefit from a decent caching system; in general, one can shave seconds just by installing a decent caching system. My two favourites are WP Rocket (commercial) and Litespeed Cache (free, but works best with Litespeed server). If you don’t control the server (eg: cPanel etc, smaller sites) I’d strongly suggest you go with WP Rocket - the money is so worth it - as it produces huge speed leaps out of the box, with no configuration. I’ve seen huge results with WP Rocket nearly every time.
As an aside, while the old favourites are WP Total Cache and Supercache, I find those harder to configure for a great result, and more likely to break sites. Great results are still possible with these guys, and in some cases they’ll be more configurable, but be prepared for a learning curve. If it’s all too much for you, then go the Rocket or Litespeed route for now.
In terms of actual hosting, the ultimate in speed solutions for a WordPress site, other than specialized and often highly customised hosting, is to use a webserver running the Litespeed server, coupled with Litespeed Cache installed as a plugin. Again, this produces great results out of the box, usually with little or no configuration. While cPanel and Litespeed combined are surprisingly good, if your site is under heavy load you’ll probably be better off with a custom VPS as others have said above.
Litespeed server on cPanel is incomparable at this point, for a number of reason. While entirely compatible with Apache, it is a complete drop-in replacement when installed. Apache has a number of profound problems where performance iss required, the top being that it exhibits both memory leaks and exponential dropoff when the load gets high. Speaking as a former hosting company owner/senior admin, I’ve seen performance results for Litespeed that are hard to believe until you see them with your own eyes (2-5x improvement on server load profile, for instance). Nginx gives similar results, but Litespeed works better in a cPanel environment, and is more than sufficient for normal mortals in most cases (ie small-med non-eCommerce sites).
By the way, whatever you use for caching, the idea is that it pre-loads the page for you and stores the result of WordPress execution, generally in a flat file, and just outputs that file directly to the browser on page hits. This will result in an immediate drop in TTFB, as well as an ability to serve more pages at once without slowing down (as it takes less effort to generate those pages). When faced with buggy themes and plugins that are slow, sometimes this just solves so many problems it’s easier to let the caching solution hide the slow plugins from view.
Re plugin selection - when selecting plugins, try not to install plugins with a small user base, especially if it doesn’t look like they’re well documented, or haven’t been updated recently, or have very low star ratings. It’s a bit of an art form, but you should be able to get a sense of whether a plugin is well written from a combination of those things.
Apologies for the poor writing, hope this helps, and that I haven’t left anything crucial out, nor submerged you with too many details.
Stay tuned, hope to have an announcement re performance monitoring with WPT on WordPress soon if all goes well!