There was an acute problem ((WordPress-based news site. After installing the theme, plug-ins and writing about 5,000 posts to the database, everything was fine. Many scripts, styles were connected, pictures are not optimized. In the future this will be fixed.! BUT! The site flew. Additionally installed Sphinx. The search began to work 2-3 times faster.

After transferring about 140 thousand news to the WordPress database, posts began to load for about 5-6 seconds. In the admin media files began to load at all for a very long time. What is the problem? How can I speed up the site? There are other large sites based on WordPress ... They have much more bases than me. And they work fine.

Help me, please.

Closed due to the fact that the question is too general for participants AK , 0xdb , user192664, MSDN.WhiteKnight , HamSter 2 Oct '18 at 5:38 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Start over with timer measurements: how long the queries in the database work, how long the pages are generated, how long it loads to the user. Without this information there will be a fortune telling. - Axenow
  • And what kind of help do you expect? Other sites and code are different, but we have to tell telepathically, where is the problem in your code without seeing it? - AK
  • Axenow, the page itself with all the scripts, styles and pictures loads quickly. Somewhere in a second. Maybe a little faster. But the response from the server is very long. It is a pity that WordPress is not a framework like Yii, for example. You can't climb too deep ... - LexXy

1 answer 1

Start by analyzing with the Query Monitor plugin. Which queries to the database are too heavy? How many of them? Is it possible to optimize them?

The problem may be in the non-optimal server settings. Read my article 10,000 connections per second on WordPress - maybe! . There are general recommendations on the settings of MySQL, php, nginx.

You may have to optimize the code. In this case, no profiling in any way. Watch the video of Gennady Kovshenin on this topic:

  • Thanks for the links, I will study! Hope will help) - LexXy
  • Everything worked! The site is flying! Thank you so much! There are, of course, some nuances, but they can also be defeated)) - LexXy
  • Hello! And how much database was used in your article: "10,000 connections per second on WordPress - maybe!"? - LexXy
  • @LexXy Small, but it makes no difference. Everything is cached there, it doesn't even get to php, what is the base? - KAGG Design 1:34 pm
  • PHPMyAdmin shows 1.1 Gb. The engine was MariaDB. MySQL is now. - LexXy pm