V
V
VANY2015-10-08 22:14:38
HTML
VANY, 2015-10-08 22:14:38

How to make Wordpress very fast?

Hello.
I am engaged in full-stack sites (from design to development, I do not pretend to be anything) on ​​the VP.
I make websites changeable for clients (not just records, but everything in general, contacts, descriptions, blocks are different - they are in demand and they pay).
And I don't like the fact that, in theory, the concept implies the very fact of the presence of dynamic php code in the page code. But the result is that a regular html page is loaded in 0.3 seconds, and on a vp - about 1-2 ceteris paribus.
Is it possible to somehow configure vp so that all pages with dynamic code are saved to static and loaded already?
After all, Bitrix (which is composite) somehow works, and I really like the speed there :) but I understand that, nevertheless, there is dynamics. How? Where to dig?)
===
I now speak only for the "first visit to the site." Cache is cool and has been working for a long time without any "composite sites" for $4000.
===
I may have expressed myself incorrectly. I really like it when I can go to the page in 0.4 seconds on my terrible mobile Internet, some content starts to be displayed there immediately. Yes, then the pictures are loaded there, these are trifles. The whole joke is that when there is a request from the browser - the server gives the file, and does not perform a terrible request to generate a page from wordpress'a php hooks.

Answer the question

In order to leave comments, you need to log in

12 answer(s)
E
eskrano, 2015-10-08
@eskrano

dig into the picket fence and compress the source code a bit, and if it goes deeper, throw wordpress to hell.

P
Pavel Volintsev, 2015-10-08
@copist

1. Install nginx + php-fpm
2. Configure nginx to return all pages that are generated in PHP through
habrahabr.ru/post/124684
files , do not cache if the user has logged in or left a comment through the internal comment system. If the comments are through Disquss, then Disquss will deal with them.
3. Connect plugins to Wordpress that work with memcached.
offhand: Supercacher and W3 Total Cache
4. Configure the assembly of all JS and CSS into a heap, compression and output in a minified form.

I
Igor Vorotnev, 2015-10-08
@HeadOnFire

I have already answered about the optimization of VPS for fast work of WP. You can dig through my old answers. But it's all there, of course. Now I'm just preparing a series of articles on this subject - from the system setup and packages, to optimizing WP itself and custom code. In principle, I can instruct in sufficient detail, but I'm too lazy to write here now :) If you want, hit the PM (see profile).
In short:
On shared hosting, except for caching plugins, disk cache, etc. To achieve the maximum, you need:
VPS
normally configured system, especially disk and network operations, including tcp congestion control and other nice
Nginx tweaks, you can with fastcgi_cache, for hardcore there is a module for working directly with memcached
HHVM with PHP-FPM fallback (with opcache)
Memcached / Redis
MariaDB
WordPress
plugin/class for object caching at the WP level
minification and concatenation of scripts and styles
image optimization
competent code (including the use of object cache, transients / wp_cache)
competent use of kernel functionality WP and architectural solutions
and a huge cart of small nuances
PS: such hardcore concerns not only WP but also any other platform, if you need it "quickly"
PS: and the HTTP / 2 module for Nginx has already been released, I'm just testing it now. Nimble thing (by the way, it removes a small part of the tasks listed above)

H
HoHsi, 2015-10-08
@HoHsi

* memcached
* correct nginx setup. Including cache on the user's side not only static, say for 3 seconds.

M
Mikhail Petrov, 2015-10-15
@Emike

I will tell my experience.
Online store on Woocommerce with 400 products.
In 2014 I bought (with the client's money) a paid top version of the WeboSpeedup plugin + ordered the setup from them. In total, it came out to 20,000 rubles. You can set it up yourself if you know how. The plugin provides a hefty bunch of settings.
And in 2015, they also released the Airi.rf cloud caching service. They connected to him.
Everything seems to be slick.
Costs 2500 per month. I connected 3 sites and 1000 rubles from each. I take.
For money - there for webmasters there is an opportunity to take a tariff for 10 sites with a 50% discount. 2500 per month.
I will make a reservation. I am not a technical professional. Therefore, I do not understand the nuances. It would be great to find some solution so that without problems and without regular payments. To deliver and receive a rocket)

A
Alexander Golubev, 2015-10-17
@Piocan-Alex

Ivan Ukraintsev : Then I have the WP Super Cache solution for you, the best of the free plugins. If you have a VPS hosting, then it will cache everything, if it is virtual, then it will be able to cache basically only the wp engine itself, since such hosting does not have access to the server settings.
That is, we load, for example, the main one and for 24 hours in our cache it will be stored in a ready-made, compiled form, if the page is refreshed in the browser or when another user enters, it is simply sent to the client, without recalculations. This is the best of the free caching plugins, built on the basis of a paid counterpart.
https://ru.wordpress.org/plugins/wp-super-cache/
Good article on Habré habrahabr.ru/company/regru/blog/263781, I installed some plugins myself, I liked Super Cache the most
According to the statistics from the article with Wp Rocket, my page loading speed will drop to 0.2-0.6 seconds, but I can’t believe it))

S
Soslan Aldatov, 2015-10-20
@sptm

As many have already said before me - indeed, there are plugins for caching, the same W3 Total Cache is very good. But to all this, I would recommend Varnish , a kind of reverse proxy with caching, sharpened for HTTP.

M
Maxim Martirosov, 2015-10-08
@kalbac

Ivan Ukraintsev has a lot of articles on the web about how to speed up a website on WP. Didn't they find one? Relatively recently I read an article on the hub about optimization, unfortunately I don’t have this link at hand to share with you. I'll tell you in a nutshell. Compress all pictures, compress all css and javascript files, omit loading scripts to the very bottom of the document (including jQuery). And disable a few core WP features that you don't need, at least on the frontend.

K
Kukushkin Ivan, 2015-10-09
@deleted-webter

I really like it when I can go to the page in 0.4 seconds on my terrible mobile Internet, some content starts to be displayed there immediately. Yes, then the pictures are loaded there, these are trifles. The whole joke is that when there is a request from the browser - the server gives the file, and does not perform a terrible request to generate a page from wordpress'a php hooks.
And what does php have to do with generating a page on the client?)
In php, this is solved by the cache, and on the client by completely disabling JS, with a minimum of any x-no in the form of iridescent buttons on css. and loading images after html, this is done either in css or in html5

I
Ilya Voropaev, 2015-10-09
@SV0L0Ch

Read this article and comments habrahabr.ru/post/264033 just on your question

D
Dmitry, 2015-10-11
@dimasmagadan

> so that all pages with dynamic code are saved to static and loaded already,
install a caching plugin.
will translate everything into static and load it.
further dig in the direction of optimizing the server / plugins / template. There is a huge amount of information on the Internet on this subject. can't be covered in one comment.
break the task into smaller ones, ask questions specifically on these small tasks

D
djalin, 2015-10-27
@djalin

I have

MySQL: 13 Requests, generation hour: 0.293 seconds. Memory: 11.65 MB

only db requests are cached
EM Object Cache
- if you cache the entire page, the speed will be even greater. Well, it depends on the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question