How did I optimize my Wordpress website?
My website, ngxson.com, was founded in 2017, and since then it has changed a lot. Currently, I'm using HawkHost hosting service. There are 3 key requirements for my website:
- I want to cut down the cost as much as possible
- The speed need to be fast, compare to other Wordpress sites of big companies
- It should be long-lasting (while maintaining low cost)
So what have I done to satisfy these 3 requirements? Let's look at all the "layers" from inside to outside of my server:
1. Redis Cache
This cache layer is a plugin installed in WordPress, used to cache most basic Objects such as article data, users, etc.
I use the Redis Object Cache plugin, along with the Redis server come with my hosting plan on HawkHost. If you hosting provider does not support Redis, don't worry, you can still use Redis Labs as a replacement.
2. WordPress Network
I'm using Wordpress Multisite (or WP network) mode. This mode basically allows you to create multiple Wordpress pages on the same server, without having to copy the code and create a separate database for each site.
Thanks to WP network, I can share my settings, as well as the my plugins between all the sites within the server. Therefore, I can minimize the effort for maintenance and save a little more space on the server.
Learn more about how to install WP network here: https://wordpress.org/support/article/create-a-network/
3. LiteSpeed Web Server
Actually, LiteSpeed is not my choice, it's simply because it's the default web server of HawkHost.
Just having install litespeed + its plugin for wordpress installed and the static page caching is ready!
4. Google Cloud Storage
All photos / videos on my website are saved to Google Cloud Storage (GCS). Thus, on my current server almost only have to save the database. Save space, and bandwidth too.
Actually I chose GCS rather than AWS S3, because GCS is cheaper and the speed is not so much different. In addition, GCS also gives you free 5GB, then they charge $ 0.026 per GB.
I'm using WP Stateless plugin for connecting Wordpress and GCS.
5. Cloudflare
Cloudflare, needless to say, is so popular.
I use the rocket loader and HTML / CSS / JS minify features of cloudflare. In addition, I also set a higher level of security for Wordpress login page to avoid brute-forcing password.
Hope this article will help you optimize your own Wordpress website!