M
M
Max2018-06-13 17:36:05
css
Max, 2018-06-13 17:36:05

More time ttfb. How to reduce?

Good afternoon. Need help from experts or those who have encountered. Site on Word Press. The problem is this: big time ttfb. On the main page, it is scanty, the page loads normally (relatively). 5b212b98cbbc3763120215.jpeg
Other pages load more slowly. Time ttfb happens from 2 to 4 seconds, respectively, it takes a long time to load pages. Here is the screenshot. 5b212ba35b4a7775851063.jpeg
I removed the plugins, changed the theme, there was no special result. Plus, about 140 database queries are generated in about 2 seconds.
5b212babe47ea224120468.png
Tell me how to be?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
O
Odisseya, 2018-06-13
@Odisseya

There may be several reasons. If you suspect that the CMS is slow, make a static copy of the page with a high TTFB. Measure this indicator on the statics. So, you will be able to determine how much TTFB worsens the speed of content generation by Wordpress. If the metric doesn't differ too much, look into optimizing server resources.

L
lagudal, 2018-06-14
@lagudal

More recently, I encountered a similar problem, I solved it, including here on the toaster. Only not wp, but magento2, more precisely, the theme used in the shop was the reason for this.
How they decided.
1. Tests, a lot of tests on different servers and conditions, helped to make sure that the reason is in the topic.
2. Profiler, query logging helped identify some of the most demanding modules that come with the theme.
3. Disabling these modules did not affect ttfb in any way, but the complete removal of just one of them - in my case - mega menu from the theme developer - is significant.
In the case of wp - I would first trace where the problem is exactly - in the theme, in the plugins, maybe in the hosting (server).
I guess it's not hard to do...

M
Max Medar, 2018-06-13
@MedVedar

Need to debug.
Try to catch slow queries: https://wordpress.org/plugins/query-monitor/
Try to catch slow hooks, filters, etc. : https://wordpress.org/plugins/debug-bar-slow-actions/
And there already think about how to optimize and what to do next.
If everything is smooth and slow in general, then try running your site on another hosting and evaluate the speed.

A
Alexander Aksentiev, 2018-06-13
@Sanasol

https://blackfire.io/
https://xdebug.org/docs/profiler

P
PolarOne, 2020-02-04
@PolarOneBear

There are many problems causing this, I solve it myself.
- reducing the number of plugins (even just installed ones) - reduces the response time.
- the number of processed texts, shortcodes, etc.
Disabling CF7 gave a strong increase in speed, but since it is generally convenient and needed - either load via ajax (but there may be other problems) or simply forward to one page on which, only on which! and the styles and scripts of the form will be loaded (by default, they are loaded on each page).
- debug as mentioned above. learn to use the console at a minimal level and see what causes errors, what errors.
- caching plugins. many do not recommend, but at least I would advise Autoptimize from the "accelerators". there are not many settings and it’s hard to break something, and if something stops working, turn it off one by one.
- heavy artillery and a separate conversation) - this is server optimization, in general it should initially be better to hire someone or contact support, although it will become harder (more expensive) to maintain, increase functionality through plugins. Usually recommend nginx + PHP-FPM + MariaDB

E
EvgenyMorozov, 2018-06-14
@EvgenyMorozov

It is obvious that many queries to the database are the reason for the brakes. And not so much the number of requests, rather, the speed of their processing. You need to tune your mysql

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question