The process of launching a website has many aspects that need to be considered: impeccable usability, top-notch SEO, intuitive interface, and many, many others!

WordPress is definitely a great choice for a content management system (CMS), but only at the extent of you being truly familiar with its features. This article was specifically crafted to ensure that you won’t sacrifice any critical functionality for some fancy feature overloads. You will start with the website optimization basics that will help you improve its performance.


Sounds tough? Don’t worry! With a little bit of willingness to learn, there will be nothing to blow hot and cold about. But before we proceed to the guide’s steps, you should know that having a 100 % score is not the main purpose of site’s optimization.

Your website may still have some elements, like fonts or high-resolution logos, that will slow down the loading speed. Yet, most of the times, these elements are key components of your site and you cannot remove them in exchange for obtaining a perfect score.

This is why you must keep in mind that the main scope of website optimizing is improving the user experience without damaging its main pieces. So let’s find out how you can achieve this!

The first two most important actions that you must undertake to significantly improve your website’s performance is to enable Gzip compression and leverage browser caching.


1. Enable Gzip compression


By replacing the original site with a compressed version the visitors will receive a product that is smaller in size and, therefore, works admirably faster. Through compression, the bandwidth of your pages will be reduced and this will reduce the HTTP response. It works the same one as compressing a file on your computer by significantly reducing its size and increasing your site speed as a result.

If the host offers this, you get to enable your Gzip compression directly from the cPanel, assuming that the server is also shared. Otherwise, you can achieve the same effect by inserting specific codes for resources’ compression in your .htaccess and Nginx files:

for .htaccess file:

# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml

# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

for nginx.conf file:

gzip on;
gzip_disable "msie6";

gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;


2. Leverage browser caching

Caching is used to store parts of your website on clients’ computers. Thanks to it, the next time they visit your site again or switch pages, there is no need to send another HTTP request, so the page loads quickly.

Enabling caching for your website it’s the second most important action that you should perform in order to significantly boost your site’s speed. You can install one of the available caching plugins, like WP Super Cache Plugin and WP Fastest Cache Plugin, or insert the following codes in the corresponding files:

for .htaccess file:


ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"


for nginx file (usually /etc/nginx/sites-enabled/default):

location ~* \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|css|js|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ {
expires 365d;

Keep in mind that you’ll be able to use ‘location’ only in a server block, not HTTP block, either directly or through a separate file. Also, after inserting the code, you must restart Nginx through this command:

$ service nginx restart


3. Clean the Database

Don’t take WordPress’s default configuration for granted! There is plenty of useless information that needs to be removed, such as excessive revisions, trash records, or spam comments.

Excessive post revisions, for instance, are the biggest enemies of your database’s size. Since these happen all the time, the revisions are saved automatically.

Many people perceive them as necessary and store them for years while losing Internet connections. However, the truth is that each time you’re saving an article, a new draft appears in the database, and this process will keep cluttering your storage until it affects the site’s entire performance.

Luckily for you, there is a solution to this problem you can use the WP-Optimize plugin, which will keep your database clean and efficient.



4. Pay attention to the images files’ formats


This is something you shouldn’t neglect, and we are going to explain why:

  • .JPEG (.JPG) – This is an image file extension that provides plenty of details and has no transparent areas;
  • .PNG – This is a file extension for images with several semi-transparent areas and plenty of details. Still, remember that this is a heavyweight, lossless format, and you shouldn’t use it very often;
  • .GIF – This is a file extension for simple images with only a few colors, and no semi-transparent areas at all. Most of the time, the format is applied for logos.


Make sure you use each of your images in their corresponding formats to avoid slowing down your website.


5. Optimizing images

How many times did you try to go around the built-in editor’s request to rescale/modify an image you’re trying to update?

You should know that the image will, either way, be changed prior to posting or it will change in a way that is absolutely out of your control.


Even if WordPress is doing its own modification of the image it still saves the original, non-configured version in its database. This may turn into a serious problem.

Thus, we recommend you to compress your images without hurting their quality by using this tool TinyPNG – for png and jpeg images. Simply upload your images, run the tool and you will get the optimized images which you can use on your website and still keep its loading speed up.


6. Remove useless plugins

Yes, we all know how awesome WordPress plugins can be, and we hardly resist the temptation to implement them all in places where they don’t even fit. As a beginner, you can’t expect to handle them all equally good. This is why we recommend you to install only those that are irreplaceable.


Besides, plugins don’t always perform the way you expect them to and not all of them are fast and well-optimized.

It’s quite common for an irresponsive plugin to deduct total website responsiveness, or to have a serious impact on loading speed. You should track their performance after implementation, by using free software like GTmetrix, Pingdom or Google PageSpeed Insights, or similar alternatives.

This is the reason why certain WordPress sites are fast and optimized: they resist the temptation of adding extra plugins. WordPress is an impressively powerful within its basic version, and dozens of fancy additions won’t make it a lot better.


7. Serve static content


As a website owner (or a future one), you are probably familiar with the operations that take place while your site’s page is loading. It usually involves running PHP functions or queering MySQL databases, because those are the processes that sort out content to be displayed in front of the visitor.

You have to use queries that are less intense or to avoid queries in general. But, you can also think about static versions and a cache plugin that will open the website almost instantly. The effect on the speed and overload will be obvious, especially when it comes to the server’s CPU, HD, and Memory. There are many cache plugins that meet these criteria, but the most popular one which you can use is W3 Super Cache.


8. Divide large posts into multiple pages

If your idea is to make a mega resource where you will list approximately 100 resources with an equal number of images, consider diving that post into several pages. This way the information will be clearly displayed and there will be no unnecessary loading time. The ultimate result of doing it is an increased number of views.

Sounds like a complicated thing to do, but the core is very simple. You can do it from the admin page, by entering a single code to the post:


You have to check whether you actually have a theme/template that supports post division.


9. Use a CDN


CDN stands for Content Delivery Network and is, in fact, a server network which clones the site on all location nodes. You need a CDN because it refers visitors to the closest server locations, rather than letting them request access through the main datacenter that your host is providing.

CDN is possible via few plugins or custom solutions, such as Coral CDN and Max CDN.


10. Update WordPress regularly


You can either choose to ignore pop-up notifications informing you that you’re running an outdated version/plugin, or to respond accordingly and make use of the suggested performance update.

Improvement is a never-stopping process, which means that you don’t have to download every plugin, but you should definitely consider those that can boost your site’s performance. An additional benefit is that you get access to important security updates that you should never miss.


11. Optimize video usage

Today, decent websites are almost obliged to offer video content, since it’s perceived to be a facilitating mean of delivering content to the audience.

But uploading videos doesn’t have to be a double-edged knife: you can keep customers engaged in your quality video content without making your website slow or SEO irresponsive.

The trick here is to use image thumbnails for users to click, instead of embedding the video on the actual page where it’s located. Together with great speed and SEO benefits, you will also get a stylish design since we are discussing videos with a considerably professional appearance. The feature you should definitely use is the Video Thumbnails.

Once you will perform the above steps, your website will surely load faster and will create a delightful experience for your visitors. In the era of informational overloading, it’s extremely important to deliver your services fast and efficient. So try to avoid by any means annoying your customers with a lazy loading website. If you have some personal tips on optimizing your website, please feel free to share them with us through a comment.

back to top