28 Nov Tuning The WordPress Website To Best Performance
There are so many factors that can impact your WordPress powered business website performance. Below are a few major considerations which will significantly impact the site speed.
- WordPress Cron Jobs
- Search Engine Crawl Rate
Hosting: Geographic Location & Server Hardware
Geographically, it is always the best practice to host the website on the closest server/data centre to the visitors’ location.
For instance: if majority of your customers are from Melbourne, Australia, then finding a Melbourne based hosting is the strategy we should follow.
Some business prefered using the Cloud hosting provider, like Amazon AWS and Microsoft Azure, then the availability of local data centre is the first thing we need to consider. like AWS only offering Sydney based server and Azure support both Sydney and Melbourne.
In terms of server hardware, a shared WordPress hosting plan is powerful enough for a generic business website less than 1,000 pages view a day.
However, if you do found your server resource usage is very high, consider following below steps before upgrade your server:
No matter how powerful the server we selected for our WordPress website hosting, if we don’t optimize it properly, the site can always use up big resources.
A caching plugin for WordPress is always recommended for resource optimization purpose which usually offer below capabilities:
- Files Optimisation: CSS & JS
- Image Compressing
WordPress Cron Jobs
The scheduler in WordPress is called “cron jobs”, which is the backend automation engine and running every single time when a visitor hit the site.
Unfortunately, these will impact our site performance on a popular site.
The workaround we can do before upgrading our server or plan is available from most of the hosting providers.
Taking over WordPress cron jobs to Hosting cron jobs (if hosting supported):
1. Edit WordPress “wp-config.php”, add below line
2. Create a hosting cron jobs, usually in cPanel, replace below path to your own
php -q /home/rickygao/public_html/wp-cron.php >/dev/null 2>&1
Note: some hosting provider has limitation on cron jobs, so setting it to every 15mins is acceptable for most of them.
CDN (Content Delivery Network)
If Caching is still not good enough, CDN (Content Delivery Network) is the next level we can reduce the server load and site speed.
The big benefit of CDN service is that it can not only faster our local visitors to the site, but also global visitors as well.
Let’s take the most popular one CloudFlare as an example, on boarding CloudFlare to your business WordPress website is as simple as below steps:
1. Register a CloudFlare account
2. Add Site
3. Update DNS record: point to CloudFlare
4. Create “Page Rules”: excluded WordPress “wp-admin” folder
4. Wait: usually a few minutes
5. Install WordPress “CloudFlare” plugin (Optional)
6. Enjoy CDN
If the hosting server load is still high after all of above tweak. Then we have to consider if the search engine Crawl Rate is too high.
By adding below line onto your robots.txt (WordPress root folder) will reduce most of the search engine crawl rate but not Google
However, Google bot is always ignore the robots.txt
The ONLY way to limit Google crawl rate is in Google Webmaster console, which will be reset by Google every 90 days.
- Website Speed
The beauty of CDN technology is no matter where the visitors are coming from, they can always benefit from the nearest local cache and enjoy the fast loading speed
As you can see above, with CloufFlare enabled, there is not that much speed increased accessing our business site from Melbourne (server physical location) and New York City. Before it was over 6 seconds from NYC.
- Server performance
As a result, our server load is significantly optimized and reduced.