For Beginners: How To Optimize Your WordPress Site

For Beginners: How To Optimize Your WordPress Site

These tips will guide you on how to optimize website speed and performance. Having a fast site is essential if you want to give your visitors a great user experience.  A fast site is also essential to  rank well on Google and other search engines. Search engines like Bing and Google take the loading speed of your pages into consideration.

Cache Plugin Optimization

Caching plugins allow you to publish static HTML files instead of dynamic files. This greatly reduces the time a page takes to load as there are no PHP or MySQL commands to execute.

Additional caching features include minification, caching of feeds, Gzipping, Content Delivery Network (CDN) support, and much more.

Caching your pages is one of the most effective ways of improving your page loading times, with many plugins promising a loading time improvement of at least ten times. Popular caching plugins include WP Super Cache, W3 Total Cache and WP Fastest Cache. All three plugins are available free.

gZIP compression

To decrease the size of data that’s being transferred between your server and your visitors, you can enable the gZIP compression for your images, CSS and JavaScript files. By doing this, the web server will compress (like creating a ZIP file ) this content before it’s transferred over the Internet to your browser. On the other side, the browser decompresses the content before rendering it. This significantly lowers the size of information that’s being transferred lowering the loading times of your website’s pages.

The easiest way to enable the gZIP compression for your images, CSS and JS files is to add these lines to your .htaccess file in the root WordPress folder:

Optimize With a CDN

Content delivery networks (CDN) are server networks that clone cached copies of your site on all of their location nodes. This means that when your visitors visit your site, the CDN will serve a cache of it from the closest server location, rather than the main data center of your hosting provider. Popular content delivery networks include MaxCDN, Amazon, CloudFront and CloudFlare. We use CloudFlare on Moikabi Post.

Image Optimization

Images are essential part of every website. It is important to optimize them. There are few things about your images that you should have in mind when developing your WordPress site:

  • Use images with the proper size. Do not upload big images and then scale them with HTML. Make sure that your photos and other images are not bigger than the size you’re actually displaying them in.
  • Smush your images. Smushing them will remove all the unnecessary data from your photos – creation date, camera used for the photo, GPS coördinates, etc. There is a plugin that does that for you called WP
  • If possible, use Sprites for your themes. Using sprites is a CSS technique that uses a single image to show multiple design elements on your pages. This way instead of loading dozens of small images (making http requests each time), your site will open a single one. Always look for themes that use sprites.

Optimize By Minifying Your JavaScript and CSS files

Minifying your CSS and JavaScript files removes all the unnecessary data from them like double spaces, empty new lines, comments, etc. from the files lowering their size. There are many online tools that you can use for free to minify your files. In addition, if you’re using the W3 Total Cache plugin, you can automatically minify your theme’s CSS and JS files using its options.

Optimize By Leveraging browser caching

Some of the largest files on your website rarely change. This includes CSS files, JavaScript files, your website logo etc. One way to take advantage of this is to enable browser caching.

Browser caching allows internet users to speed up the loading time of their favorite websites by storing a cached copy of your website locally. This reduces calls to your server and saves the user from downloading the same files again.

You can enable browser caching by adding the following code to your .htaccess file:

Also published on Medium.

About Nathaniel Moikabi

Nathaniel Moikabi is a blogger and a tech professional with 9 years of experience in the high-powered world of writing, marketing and technology. Moikabi is on a mission to help everyday entrepreneurs build sustainable business, stop stressing about their marketing, and start living the life they’ve always wanted.

View all posts by Nathaniel Moikabi →

One Comment on “For Beginners: How To Optimize Your WordPress Site”

Leave a Reply