R
R
Roman Basharin2017-01-11 00:01:19
Profiling
Roman Basharin, 2017-01-11 00:01:19

What is the normal loading speed of a PHP script on wordpress?

Firework! Recently started working with WP and was not pleasantly surprised by the page loading speed. I googled and did not find answers to the question I asked in the topic. Actually, I would like to know:
1) If you know what is the average speed of a PHP script on the VI? It is the part with the processing of the PHP script that is interesting, what slows down on the client and works slowly is not so important now.
2) What are the indicators of your sites on the WP? What do you think, what 2-3 actions among those taken to accelerate were the most effective?
From myself: I
checked the speed of the script by changing the index.php code to this

echo '<br>';
$time = microtime(true);

define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
echo (microtime(true) - $time).' сек.';
echo '<br>';

Data:
openserver (nginx + php7) The
database is now on the VPS, not on the same server as the VP engine. My other site, which knocks the same way to this database, executes the script along with several SQL queries in 200-250ms
. Zero installed plugins and pages that are almost empty in content.
And now to the main thing. Average load time after a dozen page reloads with cache refresh (Ctrl + F5)
2.5740611553192 sec. - Twenty Fifteen theme
3.052529001236 sec. - Twenty Sixteen theme
1.6890511512756 sec. - Twenty Seventeen theme
3.1267220020294 sec. - Longform theme
When changing a constant in index.php on average 1.2-1.3 sec. Well, it's like a kapets. UPDATE 1
define('WP_USE_THEMES', false);

A question for the guru of PHP, deployment, GIT, etc.
From another machine (let's call it M1), the site loads exactly 10 times faster.
Initially, the VP was set on M1, the remote database is indicated in the settings, so there is no difference here. M1 and M2, as well as the database server, are located in St. Petersburg. The code installed on M1 is uploaded to bitbucket and downloaded to M2 in the same form. That is, the code is identical.
Both machines have the same version of openserver, php, nginx, the same settings. The difference in the loading speed of other twin projects on the machines is the same, that is, only the site on the VP after such manipulations began to work more slowly on M2.
UPDATE 2.
After moving the code to prod. It turned out that the script execution speed was generally about 0.03s, and 0.27s was the wait when working with the database. Now the script with the database is on one disk, as a result, everything, together with the connection, is executed in less than 0.1 s. The basic template is loaded completely in the browser in about 1s.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman Basharin, 2017-01-20
@Hellek

The script execution speed is about 0.03s, and 0.27s was the wait when working with the database. Now the script is on the same disk with the database, as a result, everything, together with the connection, is executed faster than in 0.1s. The basic template is loaded completely in the browser in about 1s.

N
Neocaridina, 2017-01-11
@Neocaridina

Plugins... themes... they are universal... you have to pay for it... speed... zzz
I try to replace plugins with simple php in theme files.
And it's better to sketch your topic.
In general, sharpen everything for a specific site.

I
Igor Vorotnev, 2017-01-12
@HeadOnFire

I would venture to guess that machine M1 is a Unix server, while initially you are testing on Open Server under Windows. Winda is a slow thing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question