Speed up WordPress with Cloudflare

WordPress consists of a lot of dynamic parts. When you load a page from a WordPress website, the backend software runs through a bunch of calls to load different pieces to the website. For instance, there is a call to load the header area, the footer area, the main content, and the widget area. Each request for a piece of the web page results in a separate call to the web server. Add in different plugins and the number of server requests increases dramatically. Although some of these calls happen very quickly, some others slow a web page down. Most notably are web pages with a lot of dynamic content. In this article, I will look at speeding up a WordPress website using Cloudflare.

The premise behind Cloudflare is they will take a copy of your website and place the copy on their web servers. As they have web servers found all around the world, they will serve your website from the server that is closest to your website visitor. For web servers, distance equals speed. The father a website visitor is away from the web hosting server, the slower the page loads.

Cloudflare has options for caching normally static WordPress pages (i.e. those that do not often change such as the About, Contact, and Services pages). The caching function will reduce the load on your web server because it won’t have to generate these static pages every time someone visits the page. Instead, Cloudflare will serve up the cached version.

Images are the number one cause of slowing websites down. Most often, website owners upload photos from their smart phone without optimizing them for the web. For example, on my iPhone, photos are over 3000 pixels wide and take up megabytes of space. For a website, you can reduce the photo dimensions and corresponding file size without sacrificing image quality. A smaller image size results in a faster page load. Cloudflare has a built-in image optimization feature (called Polish. Enable Polish in your Cloudflare account to automatically compress your images.

 A website consists of a variety of text files (developed by programmers) which are laid out for easy human reading (i.e. tabs and spaces inserted to line items up). These extra tabs and other white space items increase the size of these files (typically JavaScript, CSS, and HTML). Computers don’t need these extra spaces. Use Cloudflare to minify these files. Not only does it reduce the size of the files, but it also makes the smaller files load faster.

Having your WordPress website cached by Cloudflare reduces the Time to First Byte (the time it take the webserver to send the first web page information), the First Contentful Paint (when the web browser starts displaying content), and the speed index (overall page loading time). Reducing these three items means visitors will see your web pages faster.

Many website owners install Google Analytics code to their website to track visitor statistics and demographics. What they don’t know is that the Google Analytics code is known as render blocking code (it pauses a page from loading until the Google code is loaded). This pausing slows a website down. On Cloudflare, you can have Cloudflare add the Analytics code to all of your web pages from their server. This will remove the render blocking code from your website and speed it up.

Another added advantage of using Cloudflare is if your web server goes down, Cloudflare will still serve up the version they have in their cache. This way, visitors will still see your website (instead of seeing an error).

There are several ways to add Cloudflare to your WordPress website. The first way is to create a Cloudflare account, tweak the account settings, set up the website domain to point to Cloudflare, and wait for the domain name servers to update (usually takes a couple of hours to complete). Once Cloudflare takes a copy of your website, it will start serving it to visitors.

The second way is to install the Cloudflare Automatic Platform Optimization plugin. Once installed, authenticate the plugin and enable the Automatic Platform Optimization. You will need a Cloudflare account to authenticate the APO plugin (costs $5.00 per month). Authentication consists of creating an API Token (used to link your website to Cloudflare) and entering the API Token on your website dashboard.

Adding Cloudflare to your WordPress website will boost the performance of your website and provide your visitors with a better experience. Your web pages will load faster. Search engines will rank your website higher. Your website will be more secure as Cloudflare has built in hacker protection. Speed up your website today with Cloudflare.

Need help setting up Cloudflare?

Let’s chat!

Share This