How can WordPress run faster?

The question on our Facebook page it was: "What makes fast?" There were several answers: the cloud, the CDN, the server location. Yes, they may be, but they are not enough. uses cloud hosting in a fairly powerful VPS (AMD EPYC 7702, 64GB DDR4 RAM (ECC) with 10 dedicated cores) but we could have something smaller. But what plays an important role in the performance of the site is the setup.

O Apache μπορεί να προκαλέσει απόδοσης όταν ο αριθμός των ταυτόχρονων χρηστών αυξάνεται πάνω από ένα συγκεκριμένο σημείο – ίσως εκατοντάδες ταυτόχρονοι χρήστες. O Apache διαθέτει σημαντικούς πόρους σε κάθε σύνδεση, και έτσι τείνει να εξαντλείται η διαθέσιμη μνήμη. Ο Apache μπορεί να ρυθμιστεί ώστε να περιορίζει τις δέσεις για να αποφεύγεται η εξάντληση της μνήμης, αλλά αυτό σημαίνει ότι όταν ξεπεραστεί το όριο, τα νέα αιτήματα σύνδεσης θα πρέπει να περιμένουν.

Additionally, Apache loads another copy of the mod_php module into 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 (προφέρεται X) διαχειρίζεται καλύτερα τα στατικά αρχεία, με ενσωματωμένα, και εύκολα ρυθμιζόμενα στοιχεία ελέγχου προσωρινής αποθήκευσης. Το φορτίο στον web server μειώνεται και ο ιστότοπος μπορεί να εξυπηρετήσει πολύ περισσότερη κίνηση πολύ ταχύτερα.

You can (if you want Apache security) place an NGINX server "in front" of Apache as the reverse server. The NGINX server will receive the requests, serve the static files and send the PHP requests to Apache, to process them.

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

Add permalink support to NGINX. This eliminates the dependency on the .htaccess file, 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 powerful that if it is not cleared automatically after each new post you will not see the post on the page.

Then we can talk about the CDN, ie the storage and serving of all static files (images, css, js) from another storage server and not from the web server running SQL and PHP. The Best Technology Site in Greecefgns

Subscribe to via Email

Subscribe to this blog and receive notifications of new posts by email.

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.).