5/01/2017

How To Speed Up WordPress?


How To Speed Up WordPress

Before you read the steps below, you might want to check your WordPress website speed on GT Metrix, Pingdom or Webpagetest.org if you haven’t already done so.


Choose a Host With Fast SSD Hosting

Web pages on an SSD server load 300% faster than HDD hosting because no mechanical parts move on an SSD drive. You can easily cut down the extra load time by moving to an SSD server. (This website is on a shared hosting plan with SiteGround where they provide fast SSD hosting and free SSL along with several other features.)

Use a Fast Loading Theme

When you decide on the theme that you want to use for your website, it is important that you go for a simpler looking theme. A flashy looking theme will more often than not come with a complex layout and unwanted features. A slow or bloated theme can cause visitors to leave the site even before it finishes loading.

Minify HTML, CSS & JavaScript

Smaller file sizes mean a faster loading website. Use Autoptimize plugin to minify HTML, CSS & Javascript. For optimal settings and to achieve a good PageSpeed score, follow these steps below in Autoptimize. Go to Settings > Autoptimize. Click on ‘show advanced settings’ option on the top right. Now, just select these boxes:

√ Optimize HTML Code
√ Keep HTML comments
√ Optimize JavaScript Code
√ Optimize CSS Code
√ Inline all CSS
√ Save aggregated script/CSS as static files

Deselect all other boxes. Under JavaScript Options, in the box Exclude scripts from Autoptimize, remove everything except seal.js. Then, click save changes and empty cache at the bottom.

Next, you need to install Google Webfont Optimizer plugin and activate it with the default settings. Finally, install Remove query strings from static resources plugin and activate it.

Use a Good Caching Plugin

W3 Total Cache is without a doubt one of the best caching plugins with great options. It will speed up WordPress massively. If you have used Autoptimize for minifying HTML, CSS & Javascript, then you should turn off minify options in W3 Total Cache.

Go to Performance > Minify and deselect Enable under each of HTML, CSS & Javascript sections and then save the settings. W3 Total Cache comes with default optimal settings, so most users will not need to make any changes to the page cache options.

Optimize Images

Every second counts, and so does the size of every image. Images should always be optimized so that they don’t add to the total size of the web page. Use WP-Smush or EWWW Image Optimizer plugin to optimize images. Both these plugins will let you reduce the file size of your images using lossless optimization technology which means the quality of your images does not suffer. You can also optimize the entire media library in one go, and if you add any new pictures, they get optimized automatically.

Optimize WordPress Database

A smaller database means a faster WordPress site. Use WP-Optimize plugin to optimize WordPress database. Use it with default settings. Making changes or selecting red marked items can cause issues. Go to WP-Optimize & click on ‘Process’ & then select ‘OK’ to optimize the database.

Thi will remove any previous post revisions, unapproved comments & spam comments along with automatically saved drafts of pages and posts. You can use this plugin every few days to reduce the size of the database. Do not enable auto clean-up feature because that feature is in beta mode.

Add an Expires header to static resources & enable compression

Gzip compresses the files before sending them over to the user’s browser. Enabling it can reduce the size of files by up to 70%. Expires headers inform the user’s browser whether to serve a particular file from the cache or request it from the server. Enabling them reduces page load time & also the load on the server.

If you have already installed W3 Total Cache plugin from the step above, you just need to tick the below boxes by going to Performance > Browser Cache to enable compression & add expires headers. Just select each of the boxes mentioned below (under sections: General, CSS & JS, HTML & XML, Media & Other Files) and deselect any others.

Don’t forget to save the settings after you have selected these boxes.

√ Set Last-Modified header
√ Set expires header
√ Set cache control header
√ Set W3 Total Cache header
√ Enable HTTP (Gzip) compression

Disable Hotlinking of Images

Disable hotlinking of images from the server side to reduce the load on your hosting server and the resources available to you. Almost all hosts have an option in the hosting account settings to disable hotlinking of images. This can also be achieved by making changes to the .htaccess file.

Use PHP 7.0

WordPress works up to 3 times faster on PHP 7.0 as compared to PHP 5.6, so make sure you upgrade to PHP 7.0 on your server to get faster performance. You can do this easily on most shared hosting plans. To upgrade to PHP 7.0 with SiteGround, see the steps here.

Use a Content Delivery Network

Instead of hosting your static files on a single server, with a CDN, you can distribute it across many servers throughout the world. It enables faster loading of files on users’ devices and less load on your server. Use a Content delivery network like CloudFlare or Max CDN. Cloudflare provides free CDN. Unless you have a busy website, you probably don’t need a content delivery network.

Found this post helpful? Share it Now!

No comments:

Post a Comment

Featured Post

iOS 12 group Facetime, Supports upto 32 people simultaneously

Apple introduces a group facetime in iOS 12 that supports video call up to 32 people at the same time along with the LIVE Memoji. It’s ...