I
I
Impeeeery2017-07-19 01:42:12
PHP
Impeeeery, 2017-07-19 01:42:12

What can slow down Wordpress (more precisely, require wp-load), while pure PHP flies, and the same site flies on LOWER hardware?

I continue the epic transition from hosting to DS (see previous question ).
This time I have a DS with Intel i7, and according to the results of this test, this time everything is fine:

<?php
$starttime = microtime(true);
  for ($i = 0; $i < 500000000; $i++) {
  }
$endtime = microtime(true);
$timediff = $endtime - $starttime;
echo $timediff
?>

This cycle runs much faster every time than it was on the hosting.
About 2.2 ms (against 5 ms for hosting).
Purely HTML'nye pages fly too.
But, alas, it's worth trying any page that has require wp-load - and it loads ... 10-20 times slower than on hosting ...
Average - 2000 ms versus 100-250 ms ..
I will dig carefully wp load.
There is a version that this is due to the fact that external access to MySQL is used (with which WP works extremely actively when loaded) - I did not transfer it and left it on the hosting. Is it possible?
What other potential bottlenecks are there in wp-load, EXACTLY SUCH, that the same site, with the same config and plugins, can work so inadequately differently on hosting and DS? Maybe something similar came across to you? How did you fight?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Puma Thailand, 2017-07-19
@opium

Damn, you are annealing at the expense of the muscle
, if it is relatively far away and not in the same DC, then everything will be very, very slow

S
Stalker_RED, 2017-07-19
@Stalker_RED

You can evaluate what exactly is slowing you down using some profiler .
And of course, with each request to the database, add the time for the network.

I
Igor Vorotnev, 2017-07-20
@HeadOnFire

There is a version that this is due to the fact that external access to MySQL is used (with which WP works extremely actively when loaded) - I did not transfer it and left it on the hosting. Is it possible?

Of course available. Connecting to an external DB takes time. Here it is added from above to the execution of the script.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question