Speed up WordPress static content


Depending on the niche, the static content of your WordPress website may cause a lot of troubles and what is more important, it could drastically slow down your website. The best WordPress speed optimization trends suggest that each site owner of developer needs to speed up the static content as it guarantees success in long run.

Before looking at the details of such optimization, let’s answer some important questions:

What is WordPress static content ?

Usually by saying static content we refer to  files that do not change based on some input, and they consist of things like JavaScript, Cascading Style Sheets, Images, and HTML files.  In other words that content does not need to be generated, processed or modified. The server your website is located on, just sends it to the visitors without any further touches. This makes the static content simplest and most efficient type of content to transmit over the Net.

How static content appears on your website ?

Nowadays each theme and plugin comes with some kind of static content. As you can imagine, nobody would install theme without any colors or some at least basic style and functionality. These features are usually based on files, that generally speaking are falling into the category of static content.

Reduce or speed up the static content ?

Well, there is no definitive answer of this question. The practice shows that both of these approaches give positive result. Again, speaking generally, the best result is based on combination of these two.

How to reduce the static content ?

This could be tricky moment in WordPress speed optimization. Unfortunately, there are no well known techniques that can be applied on every website over the Net. Still, there are a few good suggestions:

  • You may review your articles and either reduce the number of images or at least compress them
  • Remove any additional themes or plugins you do not need
  • Check your theme’s main CSS file and try to identify the part you never used or will use. If you find large portions of extra elements, then perhaps you could remove them
  • Take a look at your .htaccess file. Some security plugins add additional lines to that file making it quite large
  • If you are familiar with JS files your theme uses, then perhaps you could remove or disable some of them. Majority of the themes out there come with 20,30 to 50 .js files that are being included in every single page, killing its speed this way.

Now after these more general suggestions,  it is time to look at what is the remaining static content and how to optimize it of top performance. The first point here is to analyze the data flow and prepare a strategy. There are two options to achieve this: 1) Using browser console or 2) Using online tools such as gtmetrix or pingdom. Short explanations for each one of these approaches is as follows:

To analyze the speed using browser, just visit your page -> right click -> Inspect -> Network -> Refresh the page to see the results. Here is what is expected to be seen:

WordPress static content optimisation

WordPress static content optimisation

What we have here are one CSS, one JS and 2 image files. These are all static content and we have the following options to speed them up:

  1. Compress the existing images. This could easily be done using ewww plugin. This extension compresses the image while uploading, but also has bulk compress option which aims to optimize the existing files.
  2. The next step is compress CSS and JS files. Luckily we can apply similar tactics here. There is great plugin called Better WordPress Minify. It is focused on removing the unnecessary spaces from those files.

Now after these two simple steps, you can go back to perform the same test and analyze the data flow. The expected result is at at least 20% better stats and performance. If everything is fine, then we can look at the final touches. In order to achieve even better results, we need to use some caching mechanics. It could be Content Delivery Network, WordPress plugin installed on the application or caching feature installed on the server level. Depending on the situation each one of these solutions would give the desired result. If the hosting provider does not support caching on server level and using CDN is not an option, then W3 Total Cache seems to be logical approach. More information regarding the proper configuration can be found here in this post:

Important WordPress plugins

Another powerful and effecting caching mechanism is CloudFlare. This is content delivery network primarily focused on static cache optimization. The setup is pretty easy and straight forward. It includes setting up account at the official website and DNS adjustments of your domain name. Here is how to setup your account:

  1. Create a new account at the official website
  2. Login and Click Add site. The button is on the top right corner of the screen
  3. The system will scan your domain name name and suggest updating name servers. That change can be done from the management area of your domain name registrar.
  4. After doing this, you will be able to proceed and activate the server
  5. Generating cache may take up to 24 hours

Even the free service offers a number of advantages. The main ones of them are :

  1. Detailed analysis of the traffic
  2. DNS management
  3. Secure connects also known as https
  4. Auto minify options
  5. Firewall and page rule settings
  6. Cache management utilities
  7. Additional network protocols such as RailGun, HTTP/2 + SPDY, WebSockets and True-Client-IP Header


Do you want to share your opinion?

Your email address will not be published. Required fields are marked *


*

We are not industry specific. We are WordPress specific. We work with everyone to help them find solutions with their troubles.
If you show us the problem you are experiencing, we will show you how to fix it. It is that simple.


Here you can check the latest resolved WordPress issues

Reported WordPress issues

  1. wordpress shipping cost reduction total cart price
  2. wc_get_product_ids_on_sale() …getting product on sale in WooCommerce
  3. Preserving custom pages via redirect
  4. Wordpress - get_template_part() section not showing
  5. Can't click behind my Iframe. Is it possible?
  6. To show toggle and simple menu
  7. Post in WordPress
  8. Get Json Data when a variable matches with ACF custom field in WooCommerce
  9. BuddyPress shared user-base on Multisite separate sites
  10. How to show product variation in cloumn instead of row in Wordpress?

WordPress problems we are working on

  1. All pages redirect to home page
  2. Is possible to read a value from a dynamic HTML table and pass it to an input form?
  3. Google Shopping With Multiple Titles
  4. Wordpress - white screen of death when trying to update a page and/or a file in Editor
  5. cart is not working with more than 3 variations Woocommeerce.?
  6. Apache set Access-Control-Allow-Origin from http to https
  7. Wordpress works fine on admin dashboard but not loading for public
  8. Tranform in ::before breaking child elements in Wordpress navigation menu - CHROME
  9. How to flash error message in wordpress?
  10. Warning: Illegal string offset while searching of product

Resolved issues

  1. How to edit this function to improve performance in Wordpress?
  2. Wordpress get post id
  3. Open Lightbox on onload page
  4. Blogs posts on an alternative page?
  5. Style don't change in form
  6. Using Consolibyte's PHP Devkit to Add a Customer to Quickbooks POS Desktop v.12 w/ Web Connector
  7. How to reset all fields when adding to WooCommerce Cart
  8. Wordpress Rest API and AngularJS ui-sref and custom HTML
  9. Importing contact form in front-page.php
  10. Wordpress - adding a custom font via font-face
wppotion - powered by persistence and passion