lcp

How to speedup WordPress

How to speedup WordPress

A fast website is what everyone is wishing to accomplish, however the looking for the best solution might take a lot of time and energy. That is why we have prepared this tutorial in which we have gathered the most important steps which you should follow in order to improve the speed of your website.

Choose the right hosting package for you

Surely the first thing you should consider is what kind of package is suitable for the project which you will host. Before considering building a fast website, first review what kind of website you will build, what content you will host and the visitors which will visit your website. This will help you choose the exact package for you. We from TMDHosting offer packages for every blog, business or online shop. If you still have not chosen the right one for you, visit the link below and find the hosting plan that will suit best for your project: https://www.tmdhosting.com/

Use images with reduced size

The images are one of the main components of a website and at the same time are the heaviest part of your website because the images are built out of more bytes and take more time loading when you access the website on a browser. Once you choose the hosting plan for your website it is time for building the website. Our recommendation is to consider uploading images with reduced size. If your website is already built you can re-upload the images once you reduce them. You can use different tools to reduce the size of the images on your local device, however pay attention to the quality of the image when you resize it. Gladly, WordPress is one of the most used applications and provides the users with a lot of functionality using the plugins. One thing that can be done with plugins as well is resizing the images on your website. Some of the plugins which you may use are Optimole and WP Smush

Optimizing the code

Using a website with more custom code, using CSS and Javascript is a must have. However the code can heavily impact on the speed of your website. That is why one of the best practises to speed up your website is to minify the HTML, JavaScript and CSS files. Basically this means to reduce the extra empty lines in the file, to remove the comments, to review the length of the lines, to reduce the JavaScrip and CSS calls in the files. This will reduce the size of the file and will improve the speed on your website. Of course, WordPress provides the option to use a plugin for this task like: Autoptimize, WP Super Minify and others.

Use caching plugins

What is caching? Caching is a storage area which keeps the content of the pages already fetched from the server and stored so users can access them faster. WordPress provides the users with a lot of caching plugins which you can be installed to improve the speed of the website: WP Super Cache, W3 Total Cache and others.

Use CDN

In theory, using a CDN will improve your website loading speed globally. The CDNs are helpful if your website is visited by users from all around the world. Content Delivery Networks store a duplicate of your files which is later delivered to the users of your website from a server which is closer to their location which is speeding up the loading process

Enable GZIP for your website

As we are familiar, if we compress files on a local device this would save us a lot of space. The same is considered when you enable the gzip compression for your website. In order to enable it, all you have to do is paste the following code at the bottom of your .htaccess file:

<IfModule mod_deflate.c>

# Compress HTML, CSS, JavaScript, Text, XML and fonts

AddOutputFilterByType DEFLATE application/javascript

AddOutputFilterByType DEFLATE application/rss+xml

AddOutputFilterByType DEFLATE application/vnd.ms-fontobject

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

</IfModule>

Reduce plugins

Keeping a lot of plugins which are not used on your website could slow down the loading of your website. Our recommendation is to remove the plugins which are not necessary for the website, which will reduce the size of your website and will remove the files which are not used by the website.