How can WordPress run faster?

The question on our Facebook page it was: "What makes iGuRu.gr fast?" There were various answers: the cloud, the CDN, the of the server. Yes, maybe it is all these, but they are not enough.

iGuRu.gr uses cloud hosting on a fairly powerful VPS (AMD EPYC 7702, 64GB DDR4 RAM (ECC) with 10 cores) but we could also have something smaller. But what plays an important role in the performance of the site is the setup.

Apache can cause performance when the number of concurrent users increases above a certain point – perhaps hundreds of concurrent users. Apache allocates significant resources to each connection, so it tends to run out of available memory. Apache can be configured to limit connections to avoid running out of memory, but this means that when the limit is exceeded, new connection requests will have to wait.

In addition, Apache loads another of the mod_php module in memory for each connection, even if it only serves static files (images, CSS, JavaScript, etc.). This consumes even more resources for each connection and further limits server performance.

So to avoid all of the above, we replaced (for years) Apache with NGINX. NGINX manages many thousands of simultaneous connections with a fixed memory footprint, so we do not need to limit the number of simultaneous connections.

NGINX (pronounced engine X) manages static files better, with built-in and easily configurable cache controls. The load on the web server is reduced and the site can serve much more traffic much faster.

Μπορείτε (αν θέλετε την ασφάλεια του Apache) να τοποθετήσετε έναν NGINX server “μπροστά” από τον Apache ως αντίστροφο διακομιστή. Ο NGINX server θα λαμβάνει τα αιτήματα, θα εξυπηρετεί τα στατικά αρχεία και θα στέλνει τα αιτήματα στον Apache, να τα επεξεργάζεται.

For dynamically generated pages like those using WordPress, NGINX settings are easy.

Add permalink support to NGINX. This eliminates the dependency on the ., which is specific to Apache.
Add support for caching with a caching tool like FastCGI and of course apply all WordPress security precautions to NGINX.

Adding caching to WordPress and combining WordPress with NGINX do wonders. But they do not reach….

In addition to the above we use Cloudflare for DNS and caching. The caching from this service is so strong that if it is not automatically cleared after each new you will not see the post on the page.

Then we can also talk about the CDN, i.e. the storage and serving of all the static (images, css, js) from another storage server and not from the web server running SQL and PHP.

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.100 registrants.

Written by giorgos

George still wonders what he's doing here ...

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).