In this lunchtime #WPQuickies, I take a quick look at how to make your WordPress website go faster. Tips and tricks that are quick, easy and non-technical.
Choose A High-Performance Web Host
You will never get great website performance with traditional shared hosting where there are many other websites competing for the same physical server resources.
DIY VPS can be speedy and performant if you have the time and skills to support and manage the server.
DIY Cloud Hosting will probably get you the fastest speed and performance, again if you have the time and skills to manage the setup.
WordPress Managed hosts will give you a good level of performance for your WordPress website and they look after the whole server infrastructure included in the yearly cost.
Physical Server Location
The time it takes for the server to communicate and send information to a client web browser is called latency.
It should be obvious that the further away the physical location of the server is from the client’s location, the longer it will take to transfer data between them.
Ok, it may just be milliseconds but when you have hundreds of individual GET requests to render a single web page, that adds up to seconds and seconds are noticeable.
If you have the option, choose a data center which is closest to where your primary website target audience is.
Every domain name needs a DNS lookup to get the IP address of the physical server and not all DNS servers are equal
Long story short, on October 21, 2016 there was a massive distributed denial of service (DDoS) attack on a popular DNS provider called Dyn.
As their nameservers started to fail, premium brands such as Twitter, PayPal, Amazon, CNN, BBC, Verizon and hundreds of others were left with no way for their customers to access their websites and services.
Because of what happened some companies decided to create a secondary failover DNS system as a backup.
Amazon’s premium DNS is “Route 53″ and amongst other premium DNS services it is super fast compared with “free” single DNS providers.
Free NameCheap DNS With No Failover
Amazon Route 53 With Four Failover DNS Services
You can use the DNSPerf website to see how your web hosts’ DNS servers performance.
Content Delivery Network – CDN
CDN’s are a fantastic way of speeding up any website.
A CDN caches a copy of already visited pages from your website to multiple servers around the globe.
The server that is closest to the client web browser then serves that cached copy.
It reduces the latency time between server and client, therefore increasing the apparent speed of the site.
Of course, CDN’s aren’t perfect and there are certain areas of a site that can’t be cached such as shopping carts, checkouts and of course gated content from membership sites.
Cloudflare is one of the most popular CDN services offering both free and premium plans.
Cloudflare is also integrated into cPanel and Plesk which are popular web host server management applications, making it super easy to set up and manage.
With Cloudflare you also get the additional benefit of their lightning fast premium DNS service.
Rendering a web page takes a lot of time and effort on the server’s part.
It has to compile all the PHP and combine all the file assets like images, CSS and JS files into HTML which is the only language a web browser can understand.
There will, hopefully, be a lot of hardware caching going on at the web hosting company, but you can always improve your site’s speed with a caching plugin.
Optimise Your Database
Database Table Engine
Make sure all your DB tables are using InnoDB which is a lot faster than the older MyISAM.
To check, open up you DB in phpMyAdmin.
You can convert your database tables using phpMyAdmin or WP-CLI, whichever is your preferred method.
Here are some tutorial links:
Transients are data caches, stored in your wp_options table.
They should clear up themselves but often don’t and this can take up huge amounts of your DB.
Clear them using a plugin like Transient Manager.
Delete and Limit Post Revisions
By default WordPress saves an unlimited number of post revisions.
Nobody needs this and it takes up a humongous amount of DB space.
You can delete old revisions using the plugin WP-Sweep.
Then open up your wp-config.php file and add the following code to limit the number of post revisions WordPress stores:
define( ‘WP_POST_REVISIONS’, 3 );
Or to completely disable them, enter this code:
define( ‘WP_POST_REVISIONS’, false );
Optimise Your Images
The larger your images are the longer it will take to download them from the server and the slower your page will be to render.
Don’t muck around with image upload plugins – do all your optimisations on your local machine before uploading them.
There are plenty of native PC and Mac apps that can run optimise a single image or a directory of images in batch mode.
If you have a lot of media, you can zip up your wp-content/uploads folder on your server using cPanel or Plesk’s File Manager, download it to local, unzip, run the image optimisers, zip, reupload to the server and unzip there overwriting all files.
Any large media files PDFs, Audio and Video should reside on cloud storage like Amazon S3, Backblaze B2 or vertical services like Vimeo for videos and Soundcloud for audio.
A reputable service will be super fast and your web server will not have to expend any resources other than a single GET command.
I still find many WordPress websites sending out regular newsletter or other subscriber emails.
Don’t do that!
Sending out emails is a very costly server resource, especially if your email list is large. It can also get your web server IP address blacklisted.
Pingbacks And Trackbacks
Does anyone care about pingbacks and trackbacks for single posts nowadays? – I know I don’t.
Disable these in Settings > Discussion
The functions that are built into your theme can have an impact on speed.
Themes that offer 100’s of features tend to load in many CSS and JS files as well as external services like Google Fonts. All this will all slow down the render of your web pages
The best themes are those that have been custom built for your website needs using a lean theme.
Three popular speedy themes are GeneratePress, OceanWP and Astra
Generate Press and OceanWP rely on you installing and using a page builder.
Page builders can also make your pages slower as they have to load in extra CSS and JS files, however, that could be a compromise you are willing to make to get the convenience of not having to hire a developer or designer.
Stick with Beaver Builder or Elementor for your page builder as these are actively updated and optimised.
Audit Your Plugins
Don’t get hung up on the number of plugins you have.
Instead look at the quality and functionality.
Are you using just one function of a plugin that offers hundreds of other stuff *cough* Jetpack *cough*?
Replace that big complicated plugin for one that just does one thing.
How do you know which plugins are causing a performance issue?
First check out the bult-in Tools > Health Check to see if there are any issues there.
Secondly you can try the UsageDD plugin.
Thirdly, and you will need the cooperation of your web host for this one, is New Relic.
New Relic is a server monitoring tool that scans PHP, DB and WordPress performance and queries.
It is hands-down the best tool to use for diagnosing performance issues with your web server, however, it may not be available on all web hosts as licensing is pretty expensive.
You can see a visual of how New Relic breaks down plugins and server resources.
Lastly you can use the free Query Monitor plugin.
It allows you to view the queries and their durations that are run in the backend of WordPress.
And those are my tips for making your WordPress website go faster.
Sure there are many more, but if you cover those fundamentals your site should be running a lot faster than before.
Join me every Thursday at 1 pm AEST for some more WPQuickies.