Website Speed: Slow website speed impacts every aspect of your business. Views convert into less sales. Customers are less satisfied. It hurts search engine optimization (SEO) efforts. Google once stated that page speed is a factor in their algorithm. If your site doesn’t load fast enough, their web crawlers won’t index it all.
Below we’ll cover significant ways to optimize website speed:
The Correct Hosting Package For Your Needs
New site owners often choose a shared hosting plan for three reasons:
It’s the cheapest
Most server maintenance is restricted to the web hosting provider
Any maintenance tasks you’re responsible for are managed by a server management application (e.g. cPanel, Webmin, and DirectAdmin) to make tasks easier
But depending on your web hosting requirements, you may need a managed VPS or dedicated server. And as your business needs grow, so might your website or at least your databases. Some of the most common reasons one might need at least Linux VPS Hosting:
Root (administrative) access for a specific web application
Dedicated server or database memory for resource-intensive applications
MongoDB database management software
Nearby Server Hosting Location
The physical location of your Linux server is more important than some realize. Yes, we’ll discuss practices that can mitigate latency issues related to this. But just like we say with music production and audio editing, it’s best to get it right at the source.
If you’re a small-to-midsize business (SMB) owner, the optimal server location is close to your target audience. You can get as specific as you’d like: country, region, or city. We offer the choice between west and east coast USA. Some also have data centers in Asia and Europe.
It’s not a huge deal if you can’t find a hosting provider near your location or target audience. But again, adhering this advice can ease some future performance issues.
Server Caching Software
Server caching applications do just that – cache common server requests for faster delivery to users and remote systems. A popular use case for server caching: serving pre-compiled pages from PHP-based CMSs including WordPress, Drupal, and Magento.
There are three notable caching suites to consider for website speed optimization in your Linux server environment.
UltraStack is our proprietary caching solution which consists of four fine-tuned applications for website speed optimization.
Brotli is a newer compression algorithm that’s less resource-intensive than gzip
Redis, short for REmote Dictionary Server, caches data in RAM instead of disk space
PHP-FPM, the acronym for PHP-FastCGI Process Manager, improves performance for PHP applications
NGINX, explained a bit in detail below, caches server requests for better overall performance
NGINX is a web server that can be set as a reverse proxy server. This means it caches data onto another server or location on the same server for fasting loading on user devices.
Optimization HTTP Headers
We’re moving from server configuration to the websites and apps now. Gzip compression with mod_deflate or mod_gzip is an easy way to amp up website speed optimization. With a few lines of code in your .htaccess file, it compresses data before serving it to users. Your website will load faster, particularly for users with slow internet connections. Keep in mind, this only decreases your bandwidth and may increase server load to function optimally.
Expires headers prompt web browsers to store specific element types that are unlikely to be modified often (image, PDF, Flash, etc.) for a long duration of time. This prevents returning users from needing to wait for visited pages to reload. Of course, its effectiveness also depends on the user’s local storage settings. This is one the cases where your website speed optimization depends on the end user.
If you do a lot of web design projects, you’d benefit from creating a template .htaccess file with code for both configurations. You can test your settings with a third party HTTP compression test.
Optimize Large Files
In today’s visuals-driven culture, it’s tempting to embed high-resolution images and videos on your webpage. This can negatively affect user experience (UX) for users with slower internet. Remember, something between that 3GB 5K resolution MPEG-4 file and the end user must attempt to scale and render each frame of that video. Same thing for that beautiful high-res photo. There are two ways to handle this.
Duplicate a Scaled Version of Large Files
Use External Hosting
Photographers can use Flickr, Imgur, and other image hosting services to save space. YouTube, Vimeo, and other video hosting platforms handle conversions and performance internally so you can save disk space and time. And of course, you can always embed content from the most popular social media networks.
Web Application Caching
Many popular web apps have native caching features: Joomla, Drupal, Grav, etc. Many have third party integrations you can install as well. For WordPress users, we recommend W3 Total Cache (W3TC) most. Caching features commonly include configuring or integrating with other functions on this list.
website speed optimization settings in W3TCSome caching options in the W3 Total Cache WordPress plugin
Yes, many of the methods here may be implemented with a third party add-on, module, or plugin. But many website owners install integrations that aren’t necessary or even being used. I get it. It’s nice knowing you can easily add complex features with just a few clicks. However, they can add lag, and security vulnerabilities, if you have too many.
Web developers should minify HTML and CSS. This usually just involves removing white space, redundant code, and outdated external sources such as Bootstrap and JQuery.
CMS administrators should check that number of “Installed plugins” or whatever your app calls them. A well-known blogger once found that 87% of her site’s load time could be attributed directly to plugins. By removing just four WordPress plugins, she was able to boost her site’s load time from 4.3 seconds to 1.3.
Remember, it’s not just the number of plugins you have, but the quality of them, that affect site speed. If you only have three plugins, but they all add a ton of scripts and background processes, they’re going to negatively affect website speed optimization efforts.
Much like your installed add-ons, your theme package can have a negative impact on your website’s performance. Just because a theme looks good doesn’t mean it has good HTML validation, SEO, accessibility, or UX.
Rule of thumb: simpler is better. Animations are pretty but slow down your load speed.
Static Site Generation
Those using Jekyll, Bashblog, or other static site generators (SSGs) can skip ahead. This one applies to sites that are dynamic – rendering server requests on the fly from multiple sources such as PHP and a database. We don’t talk about this often regarding the static sites vs. dynamic sites debate, but you can create static sites from dynamic sites. Done right, this could be one of few methods of website speed optimization needed if you don’t have interactive elements like contact forms or a comments section.
The process is simple.
Find an a static site generator that fits your workflow and technical expertise (e.g. wget for terminal users, Simply Static WordPress plugin, or Static Suite Drupal module)
Duplicate your entire website to static HTML pages with your SSG
Upload the static HTML package to a separate directory or server
Organize files for public access as needed
Check your web browser for console errors
Content Delivery Network (CDN)
A content delivery network (CDN) is an external service that caches your web pages on multiple servers across the world for an instant boost in website speed. Cloudflare is the most popular example. QUIC.cloud may become more popular as HTTP/3 becomes more commonplace. Similar to integrations, CDNs can cover many other methods on this list. Some may also double as a web application firewall (WAF).
Web Application Firewall (WAF)
A web application firewall (WAF) sits in front of your sites via DNS to protect your data and server resources from distributed denial of service (DDoS), brute force, and other cyber attacks. This indirectly boosts website speed during the process. A WAF may also support CDN functions.
This can be something elaborate like the Sucuri WAF service or a separate cloud server with pfSense or ModSecurity.
Cybersecurity in General
Server and website security improvements, including backups, can be categorized as authentication, authorization, and accounting (AAA) protocols. They may increase server load if not handled correctly. But they will help website performance by ensuring resources are directed to the correct end users instead of a botnet or reverse shell. We have guides explaining how to secure cPanel servers and unmanaged Linux servers.
Remember to set antivirus scans and backups at a low time so it doesn’t affect UX.