In this article we briefly review various settings in Ubuntu Linux and Apache Web Server that are helpful for either performance purposes, search engine optimization (SEO) purposes, or both.
This is the first pass at aggregating this information so if you have ideas for other changes that can be made to achieve a high-performance website or improve SEO (but outside of WordPress) that could be added to this article, leave them in the comments below.
The web server described here relies on Ubuntu Linux, specifically Ubuntu 18.04.1 LTS, as shown below:
and below we include some configuration options that can be used to facilitate a high-performance WordPress installation, with a particular emphasis on those settings which must be configured in the operating system.
According to the article Upgrading Your WordPress Website to PHP 7.2: Everything You Need to Know: “Since mid-2017, WordPress has officially asked their customers to use PHP 7.2 or higher.” — and in fact the WordPress website suggests 7.3 or greater at the time of this writing so if you’re stuck on an old version of PHP it’s time to upgrade or consider finding a new provider and moving your website.
PHP FPM (FastCGI Process Manager)
The PHP FPM module is required for the Apache MPM event module, which we’ll look at in a moment. Briefly, the PHP-FPM (FastCGI Process Manager) module “…is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites” (see PHP-FPM – A simple and robust FastCGI Process Manager for PHP).
SSL Certificate and HTTPS
It’s easy enough to secure an entire website and it can help with SEO as well — see the articles below for more information. Installing an SSL cert in Apache is fairly straightforward — real about Apache Module mod_ssl, mod_ssl on Wikipedia, and HTTPD – Apache2 Web Server: HTTPS Configuration on Ubuntu.
- Google Is Forcing You to Switch to HTTPS by October or Lose Rankings
- Is HTTPS Good for SEO?
- 40% Of Page One Organic Search Results are HTTPS
- HTTP vs. HTTPS for SEO: What You Need to Know to Stay in Google’s Good Graces
- HTTPS as a ranking signal
Apache Web Server
In this example we’re using the Apache web server and we’re going to cover briefly the Apache MPM event and PageSpeed modules.
From the Apache MPM event page: “The event Multi-Processing Module (MPM) is designed to allow more requests to be served simultaneously by passing off some processing work to the listeners threads, freeing up the worker threads to serve new requests”.
From Understand The Apache Event MPM, “On high-traffic websites, an alternate MPM (the event MPM) is preferable because it has the ability to serve a large amount of requests while maintaining low memory usage.” and, from the same article, “[b]ecause PHP is not thread-safe on Unix environments (in particular many of its most popular extensions), it is not possible to embed an interpreter in each event MPM process. It needs to live as a separate PHP-FPM process. Apache will serve all static resources (images, CSS, etc.) directly while PHP-FPM serves the PHP-related requests.” — so, as mentioned previously, PHP FPM is a precondition for using the Apache MPM event module.
From modpagespeed.com, “The PageSpeed Modules, mod_pagespeed and ngx_pagespeed, are open-source webserver modules that optimize your site automatically”.
Some of what the Apache PageSpeed module offers can be found in various WordPress plugins however be advised that mixing Apache PageSpeed with W3 Total Cache, in particular, on the same server can be problematic and/or temperamental and may require considerable testing to find the correct configuration. One other drawback of the Apache PageSpeed module is that the server configuration becomes a bit more complex and changes to PageSpeed have to be performed via the command line whereas with W3 Total Cache the change can be made entirely in the WordPress dashboard.
The Apache PageSpeed module is, however, a very powerful module which can improve site performance considerably.
Apache PageSpeed and WordPress Caching Plugins
Apache PageSpeed and WordPress Caching plugins can be used together to achieve excellent performance results however be aware that there can be overlap in the functionality that both tools provide and if you’re not careful this can result in various problems, which we’ll cover briefly here.
Below I’ve included an outline of the flow of a request from visitors through the Apache Web Server to a WordPress Cache Plugin and back, passing through the Apache PageSpeed module and then returning to the visitor.
This issue is serious enough to show up in various discussions involving Apache PageSpeed and WordPress caching plugins so keep this in mind when mixing these two technologies.
Also note that caching plugins can include settings that may interfere with Apache PageSpeed.
See also the article entitled “Optimizing a Complex Site for Pagespeed II“.
HTTP/2, aka HTTP 2.0, can be beneficial for mainly performance that alone should positively impact SEO.
Adding support for HTTP/2 is a change which can be made relatively quickly and must be done in the Apache web server using the Apache mod_http2 module. Below are several articles which cover HTTP/2 as it applies to both performance as well as SEO.
- What is HTTP/2 and how does it benefit SEO?
- What is HTTP2 and How Will it Affect Your SEO?
- Enabling HTTP/2 in Apache on Ubuntu 18.04
- How to Enable HTTP/2 in Apache Web Server
- Does Googlebot Support HTTP/2? Challenging Google’s Indexing Claims – An Experiment
In this article we covered several technologies that can be used to improve the performance of a WordPress-based website considerably. If you have a high-performance WordPress website and are not using any of the aforementioned solutions, do let me know what your configuration includes in the comments section below along with a description of the page load timings you’ve achieved.
- Apache2 and php fpm performance optimization — Step-by-step guide
- How Migrating Apache MPM from Prefork to Event-based using PHP-FPM saved our day…
- PHP-FPM: Process Management
- Understand The Apache Event MPM
- NGINX vs Apache
- Using Apache Bench for Simple Load Testing
- How to install PHP 7.1, 7.2 and 5.6 as PHP-FPM & FastCGI for ISPConfig 3 on Debian 9
- Google IPv6 Statistics
- How To Reduce Server Response Time In WordPress To Under 200ms (The Item From Google PageSpeed Insights)
- Average Page Load Times for 2018 – How does yours compare? (see the section entitled “What is the average load time?”)
- Load time is out! (see the section entitled “Speed Index, an indicator about UX!”)
- How To Integrate Google Page Speed with W3 Total Cache (this is not the Apache PageSpeed module discussed above)
- Assess Your Website Performance in under Ten Minutes
- SEO Cheat Sheet #2: Page Speed & Image Optimization
- SEO Cheat Sheet #5: Delay, Delay, Delay
#SEO #digitalmarketing #webdesign #marketing #wordpress #inboundmarketing #contentmarketing #contentstrategy #searchengineoptimization #linux #ubuntu